Property popupMenu.this
Overload
Adds menu item with action (callback function) that is executed on click.
public Action<PMItem> this[string text, MTImage image = default, bool disable = false, int l_ = 0, string f_ = null] { set; }
Parameters
text (string)
Item text. Can include hotkey, tooltip and underlined character, like |
image (MTImage)
Item image. Read here: MTBase. |
disable (bool)
Disabled state. |
l_ (int) |
f_ (string) |
Property Value
Remarks
This function is the same as popupMenu.Add. The difference is, Add returns PMItem object of the added item. When using the indexer, to access the item use popupMenu.Last. These codes are the same: var v=m.Add("text", o=>{});"
and m["text"]=o=>{}; var v=m.Last;
.