質問

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