Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

New Developer
Posts: 20
Registered: ‎10-20-2008
My Device: Not Specified

radionbutton setchange listener


im a newbie

can any one give me a sample piece of code for the radio button setchangelistener?


i.e if i say 'Yes' i need to enable one textbox , if i say no i need to disable it



New Developer
Posts: 20
Registered: ‎10-20-2008
My Device: Not Specified

Re: radionbutton setchange listener

can anyone help me ?
Posts: 17,005
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: radionbutton setchange listener

a fieldchangelistener is independent from the type of field, just implement it.
lets say you have a method called switchTextField(boolean on) it looks like this:
public void fieldChanged(Field field, int context) {

be sure to have your radiobuttons in a radiobuttongroup
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter