Sorry guys I really forgot to mention the codings that I have done in order to access the skin of the DropDownCellRenderer , I have used some help from the blackberry website and aksing them about how to make this kind of following changes in order to access the Dropdown List in order to make the DropDownCellRenderer. I hope that by looking into the below coding some one you might be able to point out the mistake that I have done.
Code:
package{
import flash.display.Sprite;
import flash.text.TextFormat;
import qnx.ui.listClasses.DropDownCellRenderer;
public class SectionDropDown extends DropDownCellRenderer
{
private var cell:Sprite;
public function SectionDropDown()
{
super();
this.cell = new Sprite();
}
override protected function onAdded():void
{
super.onAdded();
if( this.data == null )return;
if( this.label.text == "Nikon DX Format"||this.label.text == "Nikon FX Format"||this.label.text == "Film"){
this.cell.graphics.clear();
this.cell.graphics.beginFill( 0xffea00,1 );
this.cell.graphics.drawRect( 0, 0, 279, 45 );
this.cell.graphics.endFill();
this.addChild( this.cell );
this.setChildIndex( this.label, this.numChildren-1 );
this.label.format = new TextFormat( null, null, 0x000000 );
}
}
override protected function onRemoved():void
{
super.onRemoved();
this.removeChild( this.cell );
}
}
Bookmarks