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?

有帮助吗?

解决方案

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.

其他提示

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

 form.setBackCommand();
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top