class ItemRenderer
package feathers.controls.dataRenderers
extends ToggleButton › BasicToggleButton › FeathersControl › MeasureSprite › ValidatingSprite
extended by CellRenderer, TreeViewItemRenderer
A generic renderer for UI components that display data collections.
1.0.0
.Constructor
Variables
disabledSecondaryTextFormat:TextFormat = null
The font styles used to render the button's text when the button is disabled.
In the following example, the button's disabled text formatting is customized:
button.enabled = false;
button.disabledTextFormat = new TextFormat("Helvetica", 20, 0xee0000);
The next example sets a disabled text format, but also provides a text
format for the ToggleButtonState.DISABLED(true)
state that will be
used instead of the disabled text format:
button.disabledTextFormat = new TextFormat("Helvetica", 20, 0xee0000);
button.setTextFormatForState(ToggleButtonState.DISABLED(true), new TextFormat("Helvetica", 20, 0xff0000));
Note: If the current state is ToggleButtonState.DISABLED(true)
, and
both the disabledTextFormat
and selectedTextFormat
are set, the
disabledTextFormat
takes precedence over the selectedTextFormat
.
1.0.0
.See also:
secondaryText:String
The optional secondary text displayed by the item renderer.
The following example sets the item renderer's secondary text:
itemRenderer.secondaryText = "Click Me";
1.0.0
.See also:
secondaryTextFormat:TextFormat = null
The font styles used to render the item renderer's secondary text.
In the following example, the item renderer's secondary text formatting is customized:
button.secondaryTextFormat = new TextFormat("Helvetica", 20, 0xcc0000);
1.0.0
.See also:
selectedSecondaryTextFormat:TextFormat = null
The font styles used to render the button's text when the button is selected.
In the following example, the button's selected text formatting is customized:
button.selected = true;
button.selectedTextFormat = new TextFormat("Helvetica", 20, 0xff0000);
The next example sets a selected text format, but also provides a text
format for the ToggleButtonState.DOWN(true)
state that will be used
instead of the selected text format:
button.selectedTextFormat = new TextFormat("Helvetica", 20, 0xff0000);
button.setTextFormatForState(ToggleButtonState.DOWN(true), new TextFormat("Helvetica", 20, 0xcc0000));
Note: If the current state is ToggleButtonState.DISABLED(true)
, and
both the disabledTextFormat
and selectedTextFormat
are set, the
disabledTextFormat
takes precedence over the selectedTextFormat
.
1.0.0
.See also:
Methods
getSecondaryTextFormatForState(state:ToggleButtonState):TextFormat
Gets the text format to be used by the button when its currentState
property matches the specified state value.
If a text format is not defined for a specific state, returns null
.
1.0.0
.See also:
setSecondaryTextFormatForState(state:ToggleButtonState, textFormat:TextFormat):Void
Set the text format to be used by the button when its currentState
property matches the specified state value.
If a text format is not defined for a specific state, the value of the
textFormat
property will be used instead.
1.0.0
.See also: