Tag Archive for 'itemclick'

21
Jun

Detecting when a RadioButton has been clicked in a RadioButtonGroup in Flex

The following example shows how you can detect when a RadioButton has been clicked in a FlexRadioButtonGroup by listening for the itemClick event.

Full code after the jump.

Continue reading ‘Detecting when a RadioButton has been clicked in a RadioButtonGroup in Flex’

01
Feb

Preventing a user from selecting an item in a Flex DataGrid control

The following example shows how you can prevent a user from selecting items in a Flex DataGrid control by setting the selectable property.

Full code after the jump.

Continue reading ‘Preventing a user from selecting an item in a Flex DataGrid control’

16
Jan

Preventing specific items from being selected in a Flex Tree control

In a previous example, “Preventing branches from being selected in a Flex Tree control”, we saw how we could prevent users from selecting branches (folders) in a Tree container in Flex by using the itemClick event and the Tree class’s dataDescriptor.isBranch() method.

The following example shows you how you can prevent any item from being selected by adding an attribute (named “clickable”, but you could name it anything you wanted) and using E4X expressions to determine if the currently clicked item should be selectable or not.

Full code after the jump.

Continue reading ‘Preventing specific items from being selected in a Flex Tree control’

16
Jan

Determining which item was clicked in a Flex LinkBar control

The following example shows how you can determine which item was clicked in a LinkBar control in Flex by listening for the itemClick event.

Full code after the jump.

Continue reading ‘Determining which item was clicked in a Flex LinkBar control’

16
Jan

Preventing branches from being selected in a Flex Tree control

The following example shows you how you can prevent users from selecting the branch (folder) items in a Tree control in Flex by listening for the itemClick event and using the Tree class’s dataDescriptor.isBranch() method to determine whether the currently selected item is a branch, and if so, deselect the item.

Full code after the jump.

Continue reading ‘Preventing branches from being selected in a Flex Tree control’

09
Jan

Determining which button was pressed in a Flex ButtonBar component

The following example shows how you can determine which button was pressed in a ButtonBar control in Flex by listening for the itemClick event. You can then use the item, index, or label attribute in the ItemClickEvent object to find out which button was clicked.

Full code after the jump.

Continue reading ‘Determining which button was pressed in a Flex ButtonBar component’

15
Nov

Displaying a PieSeries item’s data when a user clicks an item in a Flex PieChart control

The following example shows how you can display the selected pie series item when the user clicks a wedge in a PieChart control.

Full code after the jump.

Continue reading ‘Displaying a PieSeries item’s data when a user clicks an item in a Flex PieChart control’

06
Nov

Exploding wedges in a Flex PieChart control

The following example shows how you can explode specific wedges in a PieChart control when the user clicks an item in the chart.

Full code after the jump.

Continue reading ‘Exploding wedges in a Flex PieChart control’