04-07-2010 09:29 AM
pass ButtonField.CONSUME_CLICK as a style parameter to the fields which you are adding to manager/screen. it will solve the issue.
04-07-2010 09:31 AM
Pass ButtonField.CONSUME_CLICK style parameter to the fields.
09-27-2010 03:08 AM
I have a screen which contains some LabelField(s) that are FOCUSABLE. I want to override the default Context Menu & add ONLY two menu items "Open" & "Delete". I'm using the following code:
protected void makeMenu(Menu menu, int instance) {
Field focus = UiApplication.getUiApplication().getActiveScreen()
if ( (focus != null) && (focus instanceof LabelField) ) {
menu.add(new MenuItem("Delete Item", 10, 20) {
public void run() {
delete_item();
}
});
menu.add(new MenuItem("Open", 20, 10) {
public void run() {
open();
}
});
}
}
But I'm still getting the "Copy" option when the LabelField gets the focus. Any idea why?
Thanks
09-28-2010 05:12 AM
I'm still waiting for some guidance.
02-18-2013 02:20 AM
public boolean trackwheelClick(int status,int time)
{
Menu menuObj = new Menu();
makeMenu(menuObj,0);
menuObj.deleteItem(0);
menuObj.show();
return true;
};
menuObj.deleteItem(0); it will delete 0th position of menu item...