Question

I have a lwuit form. I wish to add my command to the right soft button.

I don't want to use Display.getInstance().reverseSoftButtons. How do i do it?

I came a across this method:

form.addCommand(myCommand, (int) );

What is the second parameter in the above method? How do i specify it? I tried putting in values like 1,3 but it gives me an exception. The documentation says it stands for offset. What is this offset and how do i specify it?

Était-ce utile?

La solution

The second parameter is the offset within the array of commands, its in the javadoc.

You can add a blank "" command or use reverse softbuttons to get such an effect. In LWUIT 1.5 or newer you can also derive MenuBar and replace it using the UIManager API.

Autres conseils

use form.setbackCommand() to add button to right sof key

 form.setBackCommand();
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top