Archive for November, 2007

30
Nov

Using the isBranch() method to determine if a Tree item is a branch or leaf

The following example shows how you can use the isBranch() method to determine if a specific node in a Tree control is a branch (folder) or leaf (item).

Full code after the jump.

Continue reading ‘Using the isBranch() method to determine if a Tree item is a branch or leaf’

29
Nov

Dragging and dropping items in a Flex Tree control

The following example shows you how you can reorder nodes in a Flex Tree control by setting the dragEnabled, dropEnabled, and dragMoveEnabled properties.

Full code after the jump.

Continue reading ‘Dragging and dropping items in a Flex Tree control’

29
Nov

Creating a Flex Tree control with variable row heights

The following example shows you how you can create a Tree control in Flex with variable row heights by setting the variableRowHeight and wordWrap properties.

Full code after the jump.

Continue reading ‘Creating a Flex Tree control with variable row heights’

29
Nov

Toggling a Tree control’s root node in Flex

The following example shows you how you can toggle the root node in a Flex Tree control’s data provider by setting the showRoot property.

Full code after the jump.

Continue reading ‘Toggling a Tree control’s root node in Flex’

29
Nov

Opening nodes in a Flex Tree control using the expandItem() method

The following example shows you how you can expand tree nodes (recursively, no less) by selecting an item from a ComboBox control.

Full code after the jump.

Continue reading ‘Opening nodes in a Flex Tree control using the expandItem() method’

29
Nov

Using the itemDoubleClick event to open nodes in a Flex Tree control

The following example shows how you can use the itemDoubleClick event to open the selected Tree node in Flex.

Full code after the jump.

Continue reading ‘Using the itemDoubleClick event to open nodes in a Flex Tree control’

29
Nov

Setting icons for specific nodes in a Flex Tree control

The following example shows you how you can override a specific node’s icon in a Flex Tree control ysing the Tree class’s setItemIcon() method.

Full code after the jump.

Continue reading ‘Setting icons for specific nodes in a Flex Tree control’

28
Nov

Detecting when a user opens or closes a Tree control in Flex

The following example shows you how you can listen for when the user opens or closes a node in a Flex Tree control by listening for the itemOpen and itemClose events to be dispatched.

Full code after the jump.

Continue reading ‘Detecting when a user opens or closes a Tree control in Flex’

27
Nov

Controlling a Tree control’s item indentation in Flex

The following example shows how you can control the amount of indentation for a child node in a Flex Tree control.

Full code after the jump.

Continue reading ‘Controlling a Tree control’s item indentation in Flex’

27
Nov

Alternating row colors in a Flex Tree control using the depthColors style

In a previous example, “Alternating row colors in a Flex Tree control using the alternatingItemColors style”, we saw how you can alternate row colors by setting the alternatingItemColors style.
The following example shows how you can alternate item colors based on the item’s depth in a Flex Tree control by setting the depthColors style to an array of colors.

Full code after the jump.

Continue reading ‘Alternating row colors in a Flex Tree control using the depthColors style’

27
Nov

Alternating row colors in a Flex Tree control using the alternatingItemColors style

The following example shows how you can alternate item colors in a Flex Tree control by setting the alternatingItemColors style to an array of colors.

Full code after the jump.

Continue reading ‘Alternating row colors in a Flex Tree control using the alternatingItemColors style’

27
Nov

Changing the open duration and easing function on a Flex Tree control

The following example shows how you can change the open duration and open easing function on a Tree control in Flex by setting the openDuration and openEasingFunction styles.

Full code after the jump.

Continue reading ‘Changing the open duration and easing function on a Flex Tree control’

26
Nov

Changing the selection duration and easing function on a Flex Tree control

The following example shows how you can change the selection duration and selection easing function on a Tree control in Flex by setting the selectionDuration and selectionEasingFunction styles.

Full code after the jump.

Continue reading ‘Changing the selection duration and easing function on a Flex Tree control’

26
Nov

Displaying the default icons from a Flex Tree control

I was looking through the Tree class today and was a little curious about what the disclosureOpenIcon and disclosureClosedIcon styles were, and ended up making the following little sample.

Full code after the jump.

Continue reading ‘Displaying the default icons from a Flex Tree control’

25
Nov

Adding custom labels to a Flex ColumnChart control’s column series

The following example shows how you can create custom labels for a ColumnChart control’s ColumnSeries in Flex, as well as creating custom label functions for a linear axis and custom data tips for the ColumnChart control.

Full code after the jump.

Continue reading ‘Adding custom labels to a Flex ColumnChart control’s column series’