Setting up default CSS for your Flex component
Jun. 23rd, 2007 | 01:42 am
mood:
geeky
There are 3 ways to specify the default styling (CSS) for your own custom-built UI components in Flex.
Let's take the example of a component called TagBar that I'm building. The component is very similar to the LinkBar component of the Flex library: it displays a list of "tags" (like a tag cloud) that the user can click through for more information.
The default look of the component is as shown in the image below:

The component itself is simply a subclass of the LinkBar component. The above look is achieved by setting the following styles:
TagBar {
color: #00A7E3;
font-family: Lucida Grande, Tahoma, Verdana, Arial;
font-size: 11;
font-weight: normal;
padding-bottom: 0;
padding-left: 0;
padding-right: 0;
padding-top: 0;
separator-width: 1;
}
How do we provide this default styling as part of the component?
( Read more... )