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
Contributor
Posts: 48
Registered: ‎07-10-2010
My Device: 8300

Simple Focus Problem

Hi,

I have an ObjectChoiceField with  values say  YES and NO.

And i have a Clickable  BitmapField

 

Now , When i  say Yes in the ObjectChoiceField, i want the BitmapField to be enabled, or have Focus.

An when i say No, this field should be disabled for user interaction.

 

How do i achieve this?

Please help 

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Simple Focus Problem

There are many ways this could be done,  Probably the easiest is to override isFocusable on the BitmapField, and have it check an internal flag.  Provide a set method for this flag so that you can turn it on and off.  Then create a FielcdChangeListener for the ObjectChoiceField, and have it set the focusable flag in the BitmapField.

 

Have a go  at doing this and see how you get on. 

Contributor
Posts: 48
Registered: ‎07-10-2010
My Device: 8300

Re: Simple Focus Problem

Thanks that worked....Smiley Happy

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Simple Focus Problem

Excellent.

 

Can you mark this as solved then?