cancel
Showing results for 
Search instead for 
Did you mean: 

Custom List Styling in Flex Not 'Sticking'

Former Member
0 Kudos

I have a custom class in a flex component, MultiList (actionscript class that extends List).

Its in-line styling in the parent MXML component is as follows. (Called in the creationComplete process)


		private function applyFlexStylesList(comp:MultiList):void { 
 		comp.setStyle("backgroundColor", 0xFFFFFF);
 		comp.setStyle("backgroundDisabledColor", 0xDDDDDD); 
 		comp.setStyle("borderAlpha", 1.0);
 		comp.setStyle("borderColor", 0xFF000000);//0xE2E2E2);
 		comp.setStyle("borderSides", "left top right bottom");
 		comp.setStyle("borderSkin", mx.skins.halo.HaloBorder);
 		comp.setStyle("borderStyle", "solid");
 		comp.setStyle("borderThickness", 4);
 		comp.setStyle("dropIndicatorSkin", mx.skins.halo.ListDropIndicator);
 		comp.setStyle("cornerRadius", 10);
 		comp.setStyle("dropShadowEnabled", true);
 		comp.setStyle("dropShadowColor", 0x000000);
 		comp.setStyle("paddingBottom", 4);
 		comp.setStyle("paddingLeft", 2);
 		comp.setStyle("paddingRight", 2);
 		comp.setStyle("paddingTop", 4);
 		comp.setStyle("useRollOver", true);
 		comp.setStyle("rollOverColor", 0x88EEFEE6);
 		comp.setStyle("selectionColor", 0x887FCEFF);
 		comp.setStyle("selectionDisabledcolor", 0xDDDDDD);
 		comp.setStyle("textRollOverColor", 0x2B333C);
 		comp.setStyle("textSelectedColor", 0x2B333C);
 		comp.invalidateList(); 	
 		comp.invalidateProperties(); 		
} 

Flex Builder 3 compiles a swf file that displays the list borders exactly as I code them.

Unfortunately, in Xcelsius, I get a very very bland list with no borders whatsoever. I have other in-line styles which work perfectly fine in both flex and Xcelsius in this SAME mxml component, but not for my MultiList.

Can anyone shed some light as to why or how to fix it?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You may also need to apply the Global styles as well and any others that the list will inherit and also refer to the haloclassic.swc.

There is a brief mention of this in the SDK release notes and Evan has a good write up here: http://everythingxcelsius.com/2010/07/custom-component-style-preservation.html.

Not sure why the link is not working so here it is as text:

http://everythingxcelsius.com/2010/07/custom-component-style-preservation.html

Regards

Matt

Answers (1)

Answers (1)

Former Member
0 Kudos

Thank you Matt.