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
Regular Contributor
SatishK
Posts: 90
Registered: ‎09-04-2009
My Device: Blackberry Z10
Accepted Solution

List multiple selection problem

hello,

 

 i have multiple item selection problem occured in list.  i have set the selection mode propertise but not working also selected item not focused.

 

thanks

Satish

Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: List multiple selection problem

hey satish,

 

what does your selectionMode setting look like? is it .selectionMode = ListSelectionMode.MULTIPLE ?

 

if that is correct, please provide us with a sample of the list code you are using. good luck!

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
Regular Contributor
SatishK
Posts: 90
Registered: ‎09-04-2009
My Device: Blackberry Z10

Re: List multiple selection problem

hey J Rab

 

thanks for reply..

This follwing  code used but not working..

 

var myList:List = new List();     
myList.rowHeight = 70;  
myList.width = 300;
myList.height = 400;
myList.setSkin(RendererItem);   
myList.selectionMode = ListSelectionMode.MULTIPLE; 
myList.addEventListener(ListEvent.ITEM_CLICKED, selectionListener);   
myList.dataProvider = dp;

 

Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: List multiple selection problem

Hey satish,

Your code looks fine with no errors. However I think your problem is in the skin (cell renderer) you are using. Can you post the custom cell renderer code you are using? Thanks.
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
Regular Contributor
SatishK
Posts: 90
Registered: ‎09-04-2009
My Device: Blackberry Z10

Re: List multiple selection problem

hello J Rab

 

this is my following Renderer class

 

public class RendererItem extends LabelButton implements ICellRenderer
 {
  
  private var _listData:ListData;
  private var _data:smileysurprised:bject;
  private var sectionProperty:int;
  private var stateProperty:smileyfrustrated:tring;
  private var columnProperty:int;
  private var indexProperty:int;
  private var isHeaderProperty:Boolean = true;
  private var rowProperty:int;
  
  
  public function RendererItem()
  {
   super();
   initialiazation();
  }
  
  
  private function initialiazation():void {   
   graphics.beginFill(Math.random()*0xBDD8F0);   
   graphics.drawRoundRect(0,0,this.width, this.height, 10, 10);
   graphics.endFill();      
  }
  
   
  public function set data(newData:smileysurprised:bject):void {   
   label = "Text here ";          
  }
  
  
  public function get data():smileysurprised:bject {
   return _data;
  }
  
  public function set section(sectionParameter:int):void
  {
   sectionProperty = sectionParameter;
  }
  
  public function get section():int
  {
   return sectionProperty;
  }
  
  public function set state(stateParameter:smileyfrustrated:tring):void
  {
   stateProperty = stateParameter;
  }
  
  public function get state():smileyfrustrated:tring
  {
   return stateProperty;
  }
  public function set column(columnParameter:int):void
  {
   columnProperty = columnParameter;
  }
  
  public function get column():int
  {
   return columnProperty;
  }
  public function set index(indexParameter:int):void
  {
   indexProperty = indexParameter;
  }
  
  public function get index():int
  {
   return indexProperty;
  }
  public function get isHeader():Boolean
  {
   return isHeaderProperty;
  }
  public function set row(rowParameter:int):void
  {
   rowProperty = rowParameter;
  }
  
  public function get row():int
  {
   return rowProperty;
  }
 }

Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: List multiple selection problem

hey satish,

 

yes, the problem seems to be your cell renderer class. from what i have done with cell renderers, you must extend the CellRenderer class and not a LabelButton class. There is more functionality within a cell renderer class than just implementing the ICellRenderer class. I suspect because you have extended wrong, you are missing functionality that the CellRenderer class provides.

 

Try removing the skin you have applied and run your code and see if the list is now clickable. good luck!

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
Regular Contributor
SatishK
Posts: 90
Registered: ‎09-04-2009
My Device: Blackberry Z10

Re: List multiple selection problem

thanks J Rab,

 

its preety helpful for me....