property Item.Caption as String

Retrieves or sets a value that indicates the item's caption.

 TypeDescription 
   String A string expression that indicates the item's caption.  

Use the Command property of the control to get an command based on the item's identifier. Use the Add property of the Menu object to add a new item. Use the Items property of the control to access to menu items at runtime. The Caption property supports built-in HTML format like follows:

Newer HTML format supports subscript and superscript like follows:

Also, newer HTML format supports decorative text like follows:

The following sample shows adds two items, one of separator type, and one of default type:

With PopupMenu1.Items
    .Add "", Separator
    Dim it As Item
    Set it = .Add("Item")
    it.ID = 1234
    it.Image = 1
End With

Send comments on this topic.
1999-2016 Exontrol.COM, Software. All rights reserved.