HI,

I am facing an issue when using Checkboxes as itemrenderer in List.

My requirement is based on boolean flag, i want to swap the skin.

if(isReadOnly) {

// check if checkbox Is selected
(v.selected) {

//set the skin class

}

I am overriding set Data method like this


*

override
*

*public* *function* *set* data(value:Object):*void*
* *

{

 *super*.data = value;

*var* rendererOwner:Object = *this*.owner;

*var* isReadOnly:Boolean = *false*;

*if* (rendererOwner != *null*)

{

*var* listOwner:CheckBoxList = rendererOwner *as* CheckBoxList;

 *if* (listOwner != *null* && listOwner.readOnly)

{

isReadOnly = listOwner.readOnly;

*if*(v.selected == *true*) {

button.styleName = myStyle; //skin class with checkmark

}

*else* {

button.styleName = myOrgStyle;// s kin class without checkmark.

}

}

*else* {

*//button.setFocus();*
* *

button.styleName =

*this*;

button.setStyle(

*'icon'*,undefined);

}

}

 }

But still when i am scrolling randomly skin is lost and button style is set
to undefined.





please let me know if you have any idea.





regards

Maleks

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/flex_india?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to