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
New Contributor
vsamurali
Posts: 4
Registered: ‎01-07-2013
My Device: Not specified

How to remove the blue background of a field while onFocus

Hi All,...

 

am Newbie to BlackBerry,

 

I wannt to hide the blue selector background for the field in blackberry, 

also I want to set the Transparent background for the field,.

 

pls tell me any one am helpless...

 

Thanks a lot in advance.

 

 

Please use plain text.
Developer
peter_strange
Posts: 19,604
Registered: ‎07-14-2008
My Device: Not Specified

Re: How to remove the blue background of a field while onFocus

Are you wanting this behavior for all Fields or for one specific Field?

 

How important is this to you?  I,am asking because what you want is

a) Not trivial, and

b) Not what BB users are used to - they are used to seeing blue focus. 

Please use plain text.
New Contributor
vsamurali
Posts: 4
Registered: ‎01-07-2013
My Device: Not specified

Re: How to remove the blue background of a field while onFocus

First of all Thanks for ur time peter,..

Actually my need is "click event on vertical field manager"

 

that is I have four vertical field managers each have one Bitmap field and Textfield

 I would like to focus the vfm and click or touch event for the vfm,.... but I can get the click event for bitmapfield and textfield only,.. thats y am trying to remove the blue background of bitmap and textfield while they got focus,...

 

Is there any other way to achiev this??? pls tel me... 

Please use plain text.
New Contributor
vsamurali
Posts: 4
Registered: ‎01-07-2013
My Device: Not specified

Re: How to remove the blue background of a field while onFocus

How can I insert the screenshot into post so that I can easily  explain my problems

Please use plain text.
Developer
simon_hain
Posts: 16,136
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: How to remove the blue background of a field while onFocus

screenshots are only allowed after a certain time or postcount i think, but you can use an external picture hoster and just paste the link.

the blue focus area is usually painted by drawFocus, you can try to override that to achieve a different effect.
you can also override navigationclick on the manager and return true to capture all clicks in its area, this would most likely be the easiest approach.
----------------------------------------------------------
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.
Developer
arkadyz
Posts: 2,268
Registered: ‎07-08-2009
My Device: various

Re: How to remove the blue background of a field while onFocus

The most straightforward way I see is to create a desirable background for the focused state (let's call it focusBackground) and use setBackground(Field.VISUAL_STATE_FOCUS, focusBackground) on your Field to replace the default behavior.

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
Please use plain text.