From the category archives:

Menu

The following example shows how you can set a variable row height on an MX MenuBar control in Flex by listening for the menuShow event, setting the Boolean variableRowHeight property on the MenuEvent object’s menu property, and then calling the invalidateSize() method.

[click to continue…]

{ 1 comment }

In a previous example, “Displaying icons in a Flex PopUpButton control”, we saw how you could add icons to a PopUpButton control’s nested menu using an Array data provider.

The following example shows you how you can add icons to a pop up menu in a PopUpButton control in Flex by specifying the iconField property in the PopUpButton control’s nested Menu control using an XML data provider.

Full code after the jump.

[click to continue…]

{ 6 comments }

In a previous example, “Adding a horizontal separator to a Flex PopUpButton control’s pop up menu”, we saw how you could add a horizontal separator to a PopUpButton control’s pop up menu in Flex by setting the type attribute to “separator” in the menu’s data provider.

The following example shows how you can adjust the amount of empty space around the horizontal separator by setting the Boolean variableRowHeight property.

Full code after the jump.

[click to continue…]

{ 2 comments }

The following example shows how you can set the open duration of a Flex Menu control by setting the openDuration style.

Full code after the jump.

[click to continue…]

{ 0 comments }

The following example shows you how you can determine if a check box menu item in a Flex PopUpButton control was checked or not by using the change event on the pop up menu along with the dataDescriptor property and isToggled() method.

Full code after the jump.

[click to continue…]

{ 0 comments }

The following example shows how you can reduce the amount of whitespace around a PopUpButton control’s pop up menu by setting the variableRowHeight property on the menu in Flex.

Full code after the jump.

[click to continue…]

{ 0 comments }

In a previous example, “Adding a horizontal separator to a Flex PopUpButton control’s pop up menu”, we saw how you can add horizontal separators to a PopUpButton control’s pop up menu by setting the type attribute to “separator”. So, “what other special types are there?”, you may be asking, as it turns out you can create folders with sub-menus, checkboxes, radiobuttons, and even disable item selection.

[click to continue…]

{ 0 comments }

The following example shows how you can add a horizontal separator to a PopUpButton control’s pop up menu in Flex by setting the type attribute to “separator” in the menu’s data provider.

Full code after the jump.

[click to continue…]

{ 0 comments }

Setting the width on a Flex PopUpButton control’s pop up menu

by Peter deHaan January 28, 2008

The following example shows how you can set the width of a PopUpButton control’s pop up menu in Flex by setting the width property on the Menu control instance.
Full code after the jump.

Read the full article →

Aligning labels in a Flex PopUpButton control’s pop up menu

by Peter deHaan January 18, 2008

The following example shows you how you can align the labels in a PopUpButton control’s pop up menu in Flex by setting the popUpStyleName and textAlign styles.
Full code after the jump.

Read the full article →

Setting the background color and background alpha on a Flex PopUpButton control’s pop up menu

by Peter deHaan January 17, 2008

The following example shows how you can change the background color and alpha of a PopUpButton control’s pop up menu in Flex by setting the popUpStyleName, backgroundAlpha, and backgroundColor styles.
Full code after the jump.

Read the full article →