If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

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

Adobe AIR Development

Reply
Developer
noahnu
Posts: 138
Registered: ‎01-09-2011
My Device: Blackberry Tablet OS
Accepted Solution

Custom Border

There is an option to set the border of a DisplayObject to a certain colour. Is there a way to use an image for the border? A custom border?

From,
Noah NU
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: Custom Border

You will have to customize one yourself.  If you use the QNX UIComponent class, you just need to overrride the protected draw() method which gets automatically called whenever the component gets resized.

Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Custom Border

Noah, which option are you referring to there?   In the QNX API, the Container object has a "debugColor" that will show the border, but it's intended solely for debugging purposes.  I don't see anything in DisplayObject that suggests it supports a border, so I'm curious what option you meant.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.
Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: Custom Border

@peter: the graphics package of the sprite class provides a way to draw "borders" and background coloring.

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Please use plain text.
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Custom Border

@JRab, I know Sprite has reams of stuff... but he referred to DisplayObject, which is a relatively remote ancestor of Sprite, with no borders.  Was just checking...


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Please use plain text.