java - Simulate click on menu item in SWT -
i want simulate click on menu item found no method. i'm thinking of doclick() of jmenu.
at moment stupid solution looks this:
private void performclick(menuitem source, event event) { source.notifylisteners(swt.selection, event); }
but maybe there's better way fire event?
a menuitem in swt can controlled method
addselectionlistener(selectionlistener listener)
the selectionlistener provides method
public void widgetselected(selectionevent arg0) {}
where can include desired functionality.
for documentation class menu item see:
Comments
Post a Comment