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
redpath
Posts: 62
Registered: ‎07-29-2008

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.

 

 

 

 

 

 

 

Please use plain text.
Administrator
MSohm
Posts: 13,073
Registered: ‎07-09-2008
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.
Found a bug? Report it using the Issue Tracker
Please use plain text.
Developer
kzettel
Posts: 120
Registered: ‎07-16-2008

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
Please use plain text.
Developer
redpath
Posts: 62
Registered: ‎07-29-2008

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

 

Please use plain text.