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.
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.
The following example shows how you can set the corner radius on the PopUpButton control in Flex by setting the cornerRadius style.
Full code after the jump.
Continue reading ‘Setting the corner radius on a Flex PopUpButton control’
The following example shows how you can set the gap between a PopUpButton control and its pop up menu in Flex by setting the popUpGap style.
Full code after the jump.
Continue reading ‘Setting the vertical gap between a Flex PopUpButton control and its pop up menu’
The following example shows how you can check whether an embedded font has a specific glyph by passing a string to the hasGlyph() method which returns a Boolean value indicating whether the font has the specified character(s).
Full code after the jump.
Continue reading ‘Determining whether a font has specific glyphs in Flex’
The following example shows you how you can copy text from a Flex application to the operating system’s clipboard by using the static System.setClipboard() method.
Full code after the jump.
Continue reading ‘Copying text to the operating system clipboard in Flex’
The following example shows you how you can create semi-transparent pop up menus using the Flex PopUpButton control by setting the backgroundAlpha, backgroundColor, and borderStyle styles on the pop up menu.
Full code after the jump.
Continue reading ‘Creating semi-transparent PopUpButton pop up menus in Flex’
The following example shows you how you can customize the width of the PopUpButton control’s arrow button in Flex by setting the arrowButtonWidth style.
Full code after the jump.
Continue reading ‘Changing the width of the arrow button in a Flex PopUpButton control’
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.
Full code after the jump.
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.
Continue reading ‘Adding a horizontal separator to a Flex PopUpButton control’s pop up menu’
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.
Continue reading ‘Setting the width on a Flex PopUpButton control’s pop up menu’
The following example shows you how you can use a tool tip on a Flex TextInput control with its displayAsPassword property set to true. By mousing over the credit card number field in the form below, you can see your credit card number in a readable tool tip.
Want the short version? Use a simple binding to bind the tool tip text to the TextInput control’s text, as seen in the following snippet:
<mx:TextInput id="ccNumber"
text="4111111111111111"
displayAsPassword="true"
toolTip="{ccNumber.text}" />
Looking for a longer version? Read on!
Full code after the jump.
Continue reading ‘Creating a tool tip on a Flex TextInput control with password masked text’
The following example will show you how you can use a CheckBox control as a custom item renderer in a List control in Flex.
I haven’t done a lot of testing yet, so if you have any tips/suggestions/improvements, please, share them in the comments.
Full code after the jump.
Continue reading ‘Using a CheckBox control as a list item renderer in Flex’
The following example shows you how you create a custom Label control in Flex that masks its text as a password by setting the Label control’s nested protected UITextField control’s displayAsPassword property.
Full code after the jump.
Continue reading ‘Displaying a Label control’s text as a password’
We’ve already seen how to get a TextInput control to display its text as a masked password field before in an earlier example, “Displaying a TextInput control’s text as a password in Flex” by setting the displayAsPassword property to true.
The following example will show you how you can listen for the focusIn and focusOut events to toggle the displayAsPassword property so that when the password field has focus the text is displayed as plain text, and when the password field does not have focus the text is displayed as masked text.
Full code after the jump.
Continue reading ‘Displaying a TextInput control’s text as a password in Flex (redux)’
The following example shows you how you can create a horizontally scrolling List control in Flex by setting the horizontalScrollPolicy property.
Full code after the jump.
Continue reading ‘Scrolling a Flex List control horizontally’