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: 228
Registered: ‎10-01-2011
My Device: Passport

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?

Developer
Posts: 16,992
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
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
Developer
Posts: 228
Registered: ‎10-01-2011
My Device: Passport

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.