I am updating an older project, written in Flex 3 with some new functionality and I cant figure out how to do something that appears to be really simple.
I am passing in data to a panel via XML and binding the properties of the panel to this XML, so for example:
<mx:Panel label="{_data.@label}" title="{_data.@title}" borderColor="{_data.@borderColor}"/>
My question is simple:
How do I set the panel Title and Status colors using data that is passed in the XML?
You can set titleStyleName to the name of a styledeclaration but the are no styles for titleColor or statusColor.
Thanks Jax, however that wasnt quite the answer I was looking for.
The difference between say for example, color and titleStylename is that you can directly bind the css attribute of color to your XML data for example
‘color={_data.@color}’
However this does not wok with titleStyleName because it requires setting up a new styledecclaration.
I have come up wiith a solution however, where I have extended the Panel and added a Bindable titleColor variable. I then set the color of the textbox upon any changes – see below:
‘
public class PanelWithColorTitle extends Panel
{
}
‘
Thanks for looking anyway!