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
Regular Contributor
VimalSandy
Posts: 97
Registered: ‎07-12-2011
My Device: curve 8900

blackberry checkboxfield

hi.. i m extending checkbox field.. i want to draw more then one string in checkbox field.. if i use super.paint() in paint method.. it will show text and only one string.. im using black background color..  without using super.paint( ) method.. it ll show checkbox i think so.. but it now visible in screen.. what is the default color of check box rectangle.. how to draw the check box without calling super.paint().. help me

Developer
juanmab
Posts: 94
Registered: ‎07-08-2011
My Device: Many

Re: blackberry checkboxfield

My solution was to create a custom Horizontal Field Manager.

Added a checkbox without text and a CustomRichTextField right next to it.

The CRTF is the one that has the code to draw in two lines.

 

Let me know if you want some code


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.

Juanma 

@juanmab

Regular Contributor
VimalSandy
Posts: 97
Registered: ‎07-12-2011
My Device: curve 8900

Re: blackberry checkboxfield

i need to write more 2 strings in checkbox field..
Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: blackberry checkboxfield

using a second field for the text is more flexible, i agree with juanmab there.
you can use a custom layout to put the text where you want it (and give it as much space as it needs).
http://supportforums.blackberry.com/t5/Java-Development/Create-a-custom-layout-manager-for-a-screen/...
----------------------------------------------------------
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