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

BlackBerry® World™ Development

Reply
Contributor
rohit_499
Posts: 25
Registered: ‎04-16-2012
My Device: Blackberry Bold

How To create a screen with rounded corner

I want a screen with rounded corners....

 

I want to make a custom dialog box but the problem is on the corner ends of the screen as i try to create a rounded rectangle the corner colors are different and it looks odd......

 

 

Please help me many thanks... for any help...

Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: How To create a screen with rounded corner

The stage precision is not high for using the built in drawing functions (eg. rounded rectangles). This is done for performance. You can create an image that is a border and then use the image scale functions to set the width and height of the panel. This is what is being done for things like text input borders to make it look good.
Contributor
rohit_499
Posts: 25
Registered: ‎04-16-2012
My Device: Blackberry Bold

Re: How To create a screen with rounded corner

I am new so can i have some piece of code....

Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: How To create a screen with rounded corner

You want ot look at the scale9Grid function. It allows you to define the edge offsets so when the image is scaled, the edges remain constant, while the "inside" is scaled. At is all by defining the Rectangle correctly that takes into account the design of your image. Here is one "older" link that I found.

http://www.flashactionscripttutorials.com/?p=projects&actionscript-functie=scale9Grid