The following example shows how you can specify a custom label function on a Tree control in Flex where the returned label is specific to the node name.
Full code after the jump.
Continue reading ‘Defining a custom label function on a Flex Tree control’
The following example shows how you can resize a List control in Flex using the rowCount property. By setting the rowCount property, the List control is automatically resized so that only the specified number of rows are displayed.
Full code after the jump.
Continue reading ‘Resizing a Flex List control using the rowCount property’
I was trying to figure out how to add icons to a TabNavigator control today and ended up making this. The trick is that you actually add the icon on the TabNavigator control’s child containers and not on the TabNavigator itself. The example also has three tabs which each look at a different filtered view of an XML document (filtered using E4X).
Full code after the jump.
Continue reading ‘Adding icons to a Flex TabNavigator control’
Here is another handy little tip that you see all over the web, how do I filter a data grid (or other list-based control) based on a user’s input? Or more specificially, how to I limit the items that show in a list based on what a user types.
Since I already created a simple XML document of Countries/States, I thought I’d create a basic form that lets a user type in the first few characters of a state name and have the DataGrid filter its results. You’ll also notice that I had to do some not-so-tricky E4X filtering to extract only the American state names.
Full code after the jump.
Continue reading ‘Filtering an XMLListCollection using the filterFunction property and regular expressions’