Results 1 to 6 of 6

Thread: DropDownCellRenderer not working on Blackberry Playbook

  1. #1
    Join Date
    Jan 2011
    Posts
    59

    DropDownCellRenderer not working on Blackberry Playbook

    Hello friends its really a good thing that the Blackberry have finally come out with its own version of the tablet pc, it is really very interesting and I can bet that this is one of the best available in the market. Now looking at the coding section which I am greatly confused form past few week is the DropDownList where I am trying to put the section headers. Although I am successful in creating the DropDownCellRenderer, but still I am very confused with the same, the thing is that whenever the first time that I click on the DropDown, it dosent shows up the first instant but after the first trial the remaining time it always shows up, now can some one help me to know why is that on the first occasion it doesn’t come and how shall I make this happen.

  2. #2
    Join Date
    Apr 2009
    Posts
    569

    Re: DropDownCellRenderer not working on Blackberry Playbook

    Dude please provide the coding that you have done to carry out the changes so as to access the DropDownCellRenderer, without this no one will be able to help you. I have also tried out accessing the DropDownCellRenderer and every time on the first instant I am able to do so instantly, I think that you might have done something wrong in the coding part and that is why you are not able to get access to the skin the first time that you click on it. So please provide the codings that you have been provided to carry out the changes in order to access the DropDownCellRenderer.

  3. #3
    Join Date
    Jan 2011
    Posts
    59

    Re: DropDownCellRenderer not working on Blackberry Playbook

    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 );
    		}
    	}

  4. #4
    Join Date
    May 2009
    Posts
    527

    Re: DropDownCellRenderer not working on Blackberry Playbook

    This is what I have tried to get the instant access of the DropDownCellRenderer the very first time when I click on it, the changes that you should definitely try to make is that instead of overriding the onAdded() method you must try overriding the drawLabel() method. Since the drawLabel() is only called once before the user interacts with it what you should do is that you should try to remove the onRemoved() method. What this will make is that it will remove the cell that you have added after a user tries closing it. If you haven’t added up the cell sprite and the the drawLabel() is only called once, then this will certainly do the work for you.

  5. #5
    Join Date
    Jan 2011
    Posts
    86

    Re: DropDownCellRenderer not working on Blackberry Playbook

    Guys I am also facing some problem with creation of the DropDownCellRenderer, I would want the header in it to be created in somewhat different way such that no one would want the user to click on it directly. What I have tried out in this is that to increase the selectedindex by one, this somewhat does the trick for me but the problem is that it shifts the skin one spot in the direction opposite to it, which I certainly not want in this DropDownCellRenderer, so can some one help me to know what are the other changes should I make to make this thing proper for me.

  6. #6
    Join Date
    Mar 2010
    Posts
    2,033

    Re: DropDownCellRenderer not working on Blackberry Playbook

    Looking at the piece of the code that have been mentioned in the above post I think that there isn’t much of the error in the code, but only one thing to be point out is that you have placed the DropDownCellRenderer inorder to make the individual cell unable to click. What I would suggest is that you should make the following changes in the header
    this.mouseChildren=false;
    this.mouseEnabled=false;
    This will surely be able to solve the problem of the headers that you are facing when you try to click on them.

Similar Threads

  1. BlackBerry Playbook not working properly
    By honor in forum Portable Devices
    Replies: 5
    Last Post: 20-05-2011, 06:08 PM
  2. Replies: 5
    Last Post: 19-05-2011, 11:33 AM
  3. Wifi and Bluetooth not working in blackberry playbook
    By Whitfield in forum Portable Devices
    Replies: 5
    Last Post: 05-05-2011, 10:57 AM
  4. Working of Sketch Pad In Blackberry Playbook
    By Aniela in forum Portable Devices
    Replies: 4
    Last Post: 22-02-2011, 02:43 PM
  5. Adobe Air Not working properly in Blackberry Playbook
    By Ossi in forum Portable Devices
    Replies: 4
    Last Post: 19-02-2011, 01:12 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,012,319.68933 seconds with 17 queries