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: 62
Registered: ‎07-29-2008
My Device: Not Specified

Custom Field on 8700 clears automatically

Is there some trick with creating a Custom Field. I have a Pearl and my custom fields

do not clear the background when invalidate is called to paint themselves when needed for

key interaction. These fields are in an extended VerticalManager that

paints its background with an image. The paint(Graphics) for a Custom field is simply

 

public void paint(Graphics gc){

   do my painting call no super

 

}

 

Now on a BB 8700 the fields clear white. So what do I need to override? I don;t call the super so it should

not clear it.

 

 

 

 

 

 

 

BlackBerry Development Advisor
Posts: 15,813
Registered: ‎07-09-2008
My Device: BlackBerry PRIV
My Carrier: Bell

Re: Custom Field on 8700 clears automatically

The drawFocus mehod could have an impact here if the field is receiving focus.  Where is the background image being drawn, in the Manager that the field resides in?

 

Can you provide the code within your paint method so we can see what your field is drawing?

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Developer
Posts: 120
Registered: ‎07-16-2008
My Device: 9000

Re: Custom Field on 8700 clears automatically

Which OS are you running?  Devices running 4.2.0 seem to have this problem more often then 4.1.0 or 4.2.1.  You may need to call invalidate() from your onFocus() and onUnfocus() methods.
Kurt Zettel | Chief Architect | Metova
www.metova.com
Highlighted
Developer
Posts: 62
Registered: ‎07-29-2008
My Device: Not Specified

Re: Custom Field on 8700 clears automatically

Thanks will do that in onUnFocus and OnFocus as I had to override these to prevent

clearing on the 8110. The OS 4.2.1.96 AT&T standard which is a wide audience we support

4.2.1 the lowest for us. Newer devices such as 8110 are 4.3 for AT&T