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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
JoVinz
Posts: 255
Registered: ‎05-03-2012
My Carrier: Vodafone

Determining selection of the field

How to determine that s perticular field such as BitmapField is selected or not?  Is there a method such as isSelected()?

Please use plain text.
Developer
lakshman9687
Posts: 226
Registered: ‎07-22-2011
My Carrier: AirTel

Re: Determining selection of the field

Hi,

 

If u want to click bitmapfield or if the current focus is in which field.

 

In first case you can override navigation click of any field like bitmapfield or labelfield..

 

In second you can find usinf Field f = getLeafFieldWithFocus(); and if(f instanceOf BitmapField) like that.

 

Regards,

Lakshman K

----------------------------------------------------------
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.

Please use plain text.
Trusted Contributor
avi_yach
Posts: 184
Registered: ‎11-26-2010

Re: Determining selection of the field

I agree with Lakshman's reply. You can use getLeafFieldWithFocus() or getLeafFIeldwithFocusIndex() on the manager which is holding this your field.

 

A Y.

Please use plain text.
Developer
simon_hain
Posts: 14,064
Registered: ‎07-29-2008
My Carrier: O2 Germany

Re: Determining selection of the field

when you mark some text it is called selection, there is a isSelecting method that checks for this.
it seems you talk about focus, you can call http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/ui/Field.html#isFocus()
depending on the situation getLeafFieldWithFocus is also helpful, as lakshman9687 suggested.
----------------------------------------------------------
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
Please use plain text.