Midlet TextBox

C

Chameleon

-------------------
TextBox tb = new TextBox("title", null, 5, TextField.DECIMAL);
tb.addCommand(new Command("Ok", Command.BACK, 0));
tb.setCommandListener(this);

Display dis = Display.getDisplay(this);
dis.setCurrent(tb);
-------------------

The code above shows (in my mobile Sony Ericsson K300i) a TextBox with 2
Commands "Ok" and "Ok".

If TextBox is empty of chars, first "Ok" is grayed but second not.

I suspect that the first Command "Ok" is part of TextBox (Screen) and
when I press it, it does nothing and commandAction method does not run.
Only when I press the second Command "Ok" commandAction method runs.

So, first "Ok" is "feature" of my mobile or it is in MIDP Specification?
If the second, how can I get access to this Command?
 
Joined
Aug 21, 2006
Messages
1
Reaction score
0
If you make use a CommandType of Command.OK for one of the command, the "special OK" command will go away.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,264
Messages
2,571,065
Members
48,770
Latest member
ElysaD

Latest Threads

Top