Welcome!

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

Reply
Developer
Posts: 157
Registered: ‎03-29-2010
My Device: 8300
My Carrier: bb

Menu invoking when Disabled Button is Clicked.

Hi,

   I am using the below code to Create a ButtonField.

btn = new ButtonField("Button1",ButtonField.CONSUME_CLICK);   
btn.setChangeListener(this);

 using the above code and using CONSUME_CLICK when i click the button the Menu is not invoked.

But the problem comes when i disable the Button using the below code

btn.setEditable(false);

 Then when the Button is disabled and on clicking it the Menu is getting invoked.

Developer
Posts: 157
Registered: ‎03-29-2010
My Device: 8300
My Carrier: bb

Re: Menu invoking when Disabled Button is Clicked.

Kindly help.

Developer
Posts: 157
Registered: ‎03-29-2010
My Device: 8300
My Carrier: bb

Re: Menu invoking when Disabled Button is Clicked.

unable to solve the issue kindly help..

Trusted Contributor
Posts: 159
Registered: ‎02-17-2011
My Device: Not Specified

Re: Menu invoking when Disabled Button is Clicked.

i can't understand that what do u want.

 

can u post ur code?

And also post ur problem clearly. 

Developer
Posts: 17,012
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Menu invoking when Disabled Button is Clicked.

it seems to be a bug (or oversight) on the buttonfield.
you could make it unfocusable as well as disabled, or implement an own buttonfield (or extending the existing one) where you handle navigationclick as you want
----------------------------------------------------------
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
Developer
Posts: 157
Registered: ‎03-29-2010
My Device: 8300
My Carrier: bb

Re: Menu invoking when Disabled Button is Clicked.

How to set Unfocusable.

Developer
Posts: 17,012
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Menu invoking when Disabled Button is Clicked.

overwrite isFocusable to return your desired value
----------------------------------------------------------
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