Radiobutton

33 views
Skip to first unread message

Adejuwon Omolara

unread,
Aug 18, 2013, 3:52:38 PM8/18/13
to codenameone...@googlegroups.com
I have been having problems on the following though I am new to CN1 technology. Please any help rendered will be appreciated.
1) I have two radiobuttons and I have been looking for a way  to disable the other if one is selected, All my tries have proved abortive. 
2) I want to implement a button that acts with respect to the radiobutton selected.
Kindly help. Thank you.

Shai Almog

unread,
Aug 19, 2013, 1:26:48 AM8/19/13
to codenameone...@googlegroups.com
1. I'm assuming you mean deselect not disable. Both radios need to be in the same group.
If you are using the gui builder just select both and type in the same button group name.
If you are using handcoding just add both to the same ButtonGroup.

2. Use the isSelected() flag on the radio button when handling the action event of the button.

Adejuwon Omolara

unread,
Aug 19, 2013, 7:13:27 AM8/19/13
to codenameone...@googlegroups.com
Thanks, I got both solved.


--
You received this message because you are subscribed to a topic in the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/codenameone-discussions/K_wk2rPVNho/unsubscribe.
To unsubscribe from this group and all its topics, send an email to codenameone-discu...@googlegroups.com.
Visit this group at http://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/9da685ba-87e2-45ac-af75-bdb15a6442d4%40googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages