public static interface TextView.PopulatePopup
The signal has a parameter of type Menu and populating the popup menu
is done by adding items to it with Menu's append()
, etc.
After constructing your menu one must call
showAll()
on the Menu or your newly added MenuItems will
not appear in the popup menu.
An example:
TextView t; t.connect(new TextView.PopulatePopup() { public void onPopulatePopup(TextView source, Menu menu) { menu.append(new ImageMenuItem(Stock.SAVE, new MenuItem.Activate() { public void onActivate(MenuItem source) { doStuff(); } })); menu.showAll(); } });
Modifier and Type | Method and Description |
---|---|
void |
onPopulatePopup(TextView source,
Menu menu)
Add MenuItems you wish to see in the TreeView's context menu to
menu . |