aspose file tools*
The moose likes Java Micro Edition and the fly likes Help with choice group.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Help with choice group.." Watch "Help with choice group.." New topic
Author

Help with choice group..

Charline Louis
Greenhorn

Joined: Dec 15, 2008
Posts: 11
hi,

i want to ask about choice group and textfield..
there's a choicegroup(POPUP) and textfield (UNEDITABLE)..
the thing is, that if the first option is chosen, the textbox next to it, it's uneditable, but with the other options, the textbox can be written..
is it possible??

help me, please..
Thanks..
Sukitha R Udugamasooriya
Greenhorn

Joined: Feb 02, 2009
Posts: 15
Try to implement the StateListener interface. It can listen to State Changes.


Sukitha Ranaba Udugamasooriya
(SCJP SCMAD SCWCD)
Charline Louis
Greenhorn

Joined: Dec 15, 2008
Posts: 11
thanks Sukitha for your reply..
you were right, i must used itemStateChanged..
now, i wonder if i choose "Other" from choicegroup, the textfield will appear, and if i choose "A" the textfield will disappear..
is it possible ??

Thanks
Sukitha R Udugamasooriya
Greenhorn

Joined: Feb 02, 2009
Posts: 15
Charline Louis,

Yes, its possible.
Call to append() or delete() in the Form where it is necessary in the stateChanged().

good luck
Charline Louis
Greenhorn

Joined: Dec 15, 2008
Posts: 11
thanks for reply..
looks like you are misunderstanding..
i mean textfield, not text inside textfield..
or maybe i shoud write "textbox"..

Thanks
Sukitha R Udugamasooriya
Greenhorn

Joined: Feb 02, 2009
Posts: 15
hi,

Actually I'm not. If you need to add an Item to a Form you have to call append() and if you want to delete an item from the Form call delete(). That will fulfill your requirement. I was not talking about formatting the text in the TextField.

regards
Charline Louis
Greenhorn

Joined: Dec 15, 2008
Posts: 11
Thanks for your reply..
i already solved it..
Charline Louis
Greenhorn

Joined: Dec 15, 2008
Posts: 11
the problem now is, i want to setFocus on a textfield..
does anybody know any way to do the setFocus ??
help, please..

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help with choice group..