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
crispyoz
Posts: 223
Registered: ‎10-01-2011

Drawing to the border on a field with rounded border

[ Edited ]

I find that if I set a rounded border on a RichTextField:

 

setBorder(BorderFactory.createRoundedBorder(new XYEdges(10,10,10,10), Border.STYLE_SOLID));

 

The rounding causes a padding area which is always in the background colour of my manager, not in the background colour of my field.  I have tried setting padding to 0 on all axis but this has no effect. I can't fill it in the paint method because this area is outside the drawable area.

 

I know it must be possible because if I look at the SMS screen on my 9900 this has a border and has no such issue. So either I am missing something or this is another limitaiton in the API.

 

Have I missed something?

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

Re: Drawing to the border on a field with rounded border

you can always use a manager as a container and draw the border yourself (as in the pre-4.6 days)
----------------------------------------------------------
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
crispyoz
Posts: 223
Registered: ‎10-01-2011

Re: Drawing to the border on a field with rounded border

Thanks simon_hain,  

 

Yes I have considered going this route but wondered if there was API functionality to make it easier for me.

Please use plain text.