Skip to Content
Former Member
Aug 04, 2010 at 06:49 PM

Custom List Styling in Flex Not 'Sticking'


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

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?