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

Posts: 15
Registered: ‎04-06-2011
My Device: Bold
My Carrier: Rogers
Accepted Solution

Skinning a qnx progressbar

[ Edited ]

Does anyone have any experience skinning the qnx progress bar? I cannot seem to get it to work. I have no issues skinning the other qnx components.


Edit: For now all im doing is overriding the draw() in ProgressBarSkin and manually creating the bar using this.witdth and this.progress.

Posts: 439
Registered: ‎10-25-2010
My Device: Not Specified

Re: Skinning a qnx progressbar

[ Edited ]

You are in luck Smiley Happy  I had to do this as well, I ended up decompiling the SWC to see how to subclass it properly.


I used 2 custom sprites in my skin, fill and track, and it looks something like this:



import assets.Assets;
import flash.display.MovieClip;
import flash.display.Shape;
import flash.display.Sprite;
import qnx.ui.progress.IProgress;
import qnx.ui.skins.UISkin;

public class MyProgressBar extends UISkin implements IProgress
        protected var skinWidth:int = 0;
        protected var skinHeight:int = 0;
        protected var _progress:Number;
        public function get progress():Number { return _progress; }
        public function set progress(value:Number):void {
               _progress = value;
               fill.width = skinWidth * _progress;

        protected var viewAssets:MovieClip;
        protected var trackSmiley Frustratedprite;
        protected var fillSmiley Frustratedprite;
       override public function setSize(w:Number, h:Number):void {
               skinWidth = w;
               skinHeight = h;
               super.setSize(w, h);
       override protected function draw():void {
               track.width = skinWidth;
               fill.height = track.height = skinHeight;
               fill.width = width * _progress;

        override protected function initializeStates():void {
               viewAssets = new Assets.ProgressBarAssets();
               track = viewAssets.track;
               fill = viewAssets.fill;