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’
The following example shows how you can use the truncateToFit property in the Label control in Flex to truncate strings if they exceed a specified width. The label control will terminate the string with “…” and allow you to roll over the text and read the entire (non-truncated) text in a tool tip, as seen in the following snippet:
<mx:Label text="The quick brown fox jumped over the lazy dog."
truncateToFit="true"
maxWidth="200" />
Full code after the jump.
Continue reading ‘Truncating text in the Flex Label control using the truncateToFit property’
The following example shows how you can truncate long item labels in a ComboBox control by setting a custom item renderer. In this example we’re using the Label control we’re using the Label control and taking advantage of the Label control’s truncateToFit property which truncates the string with an “…” and displays a tool tip showing the entire, non-truncated string when the truncateToFit property is set to true (which is the default value).
Full code after the jump.
Continue reading ‘Displaying item tool tips in a Flex ComboBox control’