Skip to main content

LWUIT 1.5 Menu disable issue

1 reply [Last post]
netman.ne
Offline
Joined: 2011-09-06

Hi, I need to disable menu commands.

for(int i = 0; i < PForm.getSoftButtonCount(); i++)
PForm.getSoftButton(i).setEnabled(value);

But, I click softbutton menu is shown!?

In LWUIT 1.4 this is well work.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
vprise
Offline
Joined: 2003-11-07

If it worked in 1.4 it was a fluke since it wasn't officially supported.

We now have a more elaborate MenuBar class that allows you to customize the menu in any way you like however I'm not sure if we provide a mechanism for disabling the menu button itself (you can just replace the MenuBar using the UIManager and implement this). You can now disable individual commands (which is probably the reason this broke) by toggling the command enabled/disabled state.