| Methods | Properties | Effects | Events | Styles | Frames | No Frames |
Direct Known Subclasses![]()
The UIComponent class is the base class for all interactive components. Interactive components can participate in tabbing and other kinds of keyboard focus manipulation, accept low-level events like keyboard and mouse input, and be disabled so that it does not receive mouse and keyboard input. This is in contrast to non-interactive components like Label and ProgressBar which simply display things and are not manipulated by the user. Non-interactive components should inherit from UIObject. Similar to UIObject, the UIComponent class is not used as an MXML tag.
Common MXML Syntax Inherited from UIComponent
All user interface components in Flex extend the UIObject class. Flex components inherit the following properties from the UIComponent class.
<mx:tagname
enabled="value"
errorString=""
tabEnabled="true|false"
tabIndex="value"
focusInEffect="value"
focusOutEffect="value"
backgroundColor="No default"
backgroundDisabledColor="0xEFEEEF"
backgroundImage="No default"
backgroundAlpha="100"
backgroundSize="100%"
barColor="No default"
borderCapColor="No default"
borderColor="Depends on component"
buttonColor="0xEFEEEF"
borderStyle="inset"
cornerRadius="0"
disabledColor="No default"
errorColor="No default"
highlightColor="No default"
modalTransparency="100"
scrollTrackColor="0xEFEEEF"
shadowColor="0x848384"
shadowCapColor="No default"
symbolColor="0x000000"
symbolBackgroundColor="0xFFFFFF"
symbolBackgroundDisabledColor="0xEFEEEF"
symbolBackgroundPressedColor="0xFFFFFF"
symbolDisabledColor="0x848384"
themeColor="No default"
focusIn="Event handler; no default."
focusOut="Event handler; no default."
hide="Event handler; no default."
invalid="Event handler; no default."
keyDown="Event handler; no default."
keyUp="Event handler; no default."
resize="Event handler; no default."
show="Event handler; no default."
valid="Event handler; no default."
valueCommitted="Event handler; no default."
>
...
child tags
...
</mx:UIComponent>
See Also
UIObject
| Methods | |
| drawFocus
Draw or remove the graphics on the object that show that it has focus. |
| getFocus(
)
:
ObjectGets the object that currently has focus. |
| getFocusManager(
)
:
ObjectGets the FocusManager that controls focus for this component and its peers. |
| setEnabled(
enabled:
Boolean)
:
VoidThis is an advanced method for use in subclassing.This method is called by Flex when the enabled property is changed, and is normally used to set the enabled property on child objects. |
| setFocus(
)
:
VoidSets the focus to this component. |
| Properties | |
| enabled:
BooleanWhether the component can accept user interaction. |
| errorString:
StringThe text that will be displayed by a component's ToolTip when a component is monitored by a Validator and validation fails. |
| tabEnabled:
Boolean If true, object can receive focus. |
| tabIndex:
NumberNumber that specifies the component's tabbing order in relation to other components in an application. |
static | version:
StringVersion string for this class. |
| Effects | |
focusInEffect | Component gains keyboard focus. |
focusOutEffect | Component loses keyboard focus. |
| Effects inherited from class mx.core.UIObject |
creationCompleteEffect
hideEffect
mouseDownEffect
mouseOutEffect
mouseOverEffect
mouseUpEffect
moveEffect
resizeEffect
showEffect
|
| Events | |
focusIn | Broadcast when an object receives focus. The event object's target property contains a reference to the component that triggered the event. The event object's type property contains the name of the event, focusIn. |
focusOut | Broadcast when an object loses focus. The event object's target property contains a reference to the component that triggered the event. The event object's type property contains the name of the event, focusOut. |
invalid | Broadcast when a component is monitored by a Validator and the validation failed The event object's target property contains a reference to the component that triggered the event. The event object's type property contains the name of the event, invalid. |
keyDown | Broadcast when a key is pressed. The event object's target property contains a reference to the component that triggered the event. The event object's type property contains the name of the event, keyDown. The event object also contains the following properties:
|
keyUp | Broadcast when a key is released. The event object's target property contains a reference to the component that triggered the event. The event object's type property contains the name of the event, keyUp. The event object also contains the following properties:
|
valid | Broadcast when a component is monitored by a Validator and the validation succeeded The event object's target property contains a reference to the component that triggered the event. The event object's type property contains the name of the event, valid. |
valueCommitted | Broadcast when values are changed programmatically. The event object's target property contains a reference to the component that triggered the event. The event object's type property contains the name of the event, valueCommitted. |
| Styles | |
backgroundAlpha |
Type:
Number
CSS Inheritance:
noAlpha level of the SWF file or image defined by backgroundImage, or the color defined by the backgroundColor property. Valid values range from 0 to 100. The default value is 100. |
backgroundColor |
Type:
Number
Format:
Color
CSS Inheritance:
noBackground color of the component. Note that some components, like a Button, do not have a background because they are completely filled with the button face or other graphics. The DataGrid control also ignores this style. |
backgroundDisabledColor |
Type:
Number
Format:
Color
CSS Inheritance:
yesBackground color of components when disabled. The default value is 0xEFEEEF (light gray). You can either have a backgroundColor or a backgroundImage, but not both. |
backgroundImage |
Type:
String
Format:
File
CSS Inheritance:
noBackground image of a control. You can either have a backgroundColor or a backgroundImage, but not both. |
backgroundSize |
Type:
String
CSS Inheritance:
noScales the image specified by backgroundImage to different percentage sizes. By default, the value is auto, which maintains the original size of the image. A value of 100% stretches the image to fit the entire screen. You must include the percent sign with the value. |
barColor |
Type:
Number
Format:
Color
CSS Inheritance:
yesColor of the outer bar. |
borderCapColor |
Type:
Number
Format:
Color
CSS Inheritance:
yesOutside left and outside right color for skins. |
borderColor |
Type:
Number
Format:
Color
CSS Inheritance:
noBlack section of a three-dimensional border, or the color section of a two-dimensional border. The following components support this style: Button, CheckBox, ComboBox, NumericStepper, ProgressBar, RadioButton, ScrollBar, Slider, and all components that support the borderStyle style. |
borderSides |
Type:
String
CSS Inheritance:
noBounding box sides. Only used when borderStyle="solid". Space-delimited string containing the sides of the border to show. Order is not important. The default value is "left top right bottom". |
borderStyle |
CSS Inheritance:
noBounding box style. The possible values are: "none", "solid", "inset" and "outset". The default value is "inset". Note:The borderStyle style is not supported by the Button control or the Panel container. To make solid border Panels, set the borderThickness property, and set the dropShadow property to false if desired. |
borderThickness |
Type:
Number
CSS Inheritance:
noBounding box thickness. Only used when borderStyle="solid". The default value is 1. |
cornerRadius |
Type:
Number
CSS Inheritance:
noRadius of component corners. The following components support this style: Panel, TitleWindow, Alert, Button, Tab, Link, ScrollBar, NumericStepper, ComboBox and any component that supports borderStyle="solid". The default value is 0. |
disabledColor |
Type:
Number
Format:
Color
CSS Inheritance:
yesDisabled color of the UIComponent. |
dropShadow |
Type:
Boolean
CSS Inheritance:
noBoolean property that controls the visibility of the component's drop shadow. The default value is false. This style must be used with borderStyle="solid". For drop shadows to appear on containers, set backgroundColor or backgroundImage. Otherwise, since the default background of a container is transparent, the shadow appears behind the container. |
errorColor |
Type:
Number
Format:
Color
CSS Inheritance:
yesColor of the error text. |
fillColors |
Type:
Array
CSS Inheritance:
noColors used to tint the background of the control. Pass the same color for both values for "flat" looking control. The default value is [0xE6EEEE,0xFFFFFF]. |
highlightColor |
Type:
Number
Format:
Color
CSS Inheritance:
yesColor of the control when it is in focus. |
modalTransparency |
Type:
Number
CSS Inheritance:
yesModality is simulated by creating a large transparent window underneath the TitleWindow component. Due to the way transparent windows are rendered, you may notice a slight dimming of the objects under the transparent window. The effective transparency can be set by changing the modalTransparency value from 0 (fully transparent) to 100 (opaque). If you make the window partially transparent, you can also set the color of the window by changing the Modal skin in the default theme. |
scrollTrackColor |
Type:
Number
Format:
Color
CSS Inheritance:
yesScroll track for a scroll bar. The default value is 0xEFEEEF (light gray). |
selectedFillColors |
Type:
Array
CSS Inheritance:
noColors used to tint the background of the control when in its selected state. Pass the same color for both values for "flat" looking control. The default value is undefined, which means the colors will be derived from themeColor. |
shadowCapColor |
Type:
Number
Format:
Color
CSS Inheritance:
yesLeft and right inside edges of a button's skin. |
shadowColor |
Type:
Number
Format:
Color
CSS Inheritance:
yesBottom inside color of a button's skin. A section of the three-dimensional border. The default value is 0x848384 (dark gray). |
shadowDirection |
CSS Inheritance:
noDirection of drop shadow. Possible values are "left", "center" and "right". The default value is "center". |
shadowDistance |
Type:
Number
CSS Inheritance:
noDistance of drop shadow. Negative values move shadow above the panel. The default value is 2. |
symbolBackgroundColor |
Type:
Number
Format:
Color
CSS Inheritance:
yesBackground color of check boxes and radio buttons. The default value is 0xFFFFFF (white). |
symbolBackgroundDisabledColor |
Type:
Number
Format:
Color
CSS Inheritance:
yesBackground color of check boxes and radio buttons when disabled. The default value is 0xEFEEEF (light gray). |
symbolBackgroundPressedColor |
Type:
Number
Format:
Color
CSS Inheritance:
yesBackground color of check boxes and radio buttons when pressed. The default value is 0xFFFFFF (white). |
symbolColor |
Type:
Number
Format:
Color
CSS Inheritance:
yesThe check mark of a check box or the dot of a radio button. The default value is 0x000000 (black). |
symbolDisabledColor |
Type:
Number
Format:
Color
CSS Inheritance:
yesDisabled check mark or radio button dot color. The default value is 0x848384 (dark gray). |
themeColor |
Type:
Number
Format:
Color
CSS Inheritance:
yesBackground of a component. Possible values are "haloGreen", "haloBlue", "haloOrange", and "haloSilver". This property can take any valid color as its value, but you only get the "halo" effect if you use one of the halo colors. |
| Styles inherited from class mx.core.UIObject |
color
fontFamily
fontSize
fontStyle
fontWeight
horizontalGap
leading
marginLeft
marginRight
textAlign
textDecoration
textIndent
verticalGap
|
| Method Detail |
drawFocus(
)
drawFocus(hasFocus:Boolean):Void
getFocus(
)
:
Object
Returns
Object that has focus.
getFocusManager(
)
:
Object
setEnabled(
enabled:
Boolean)
:
Void
Parameters
enabled:
Boolean - The value of the enabled property.
setFocus(
)
:
Void
| Property Detail |
enabled:
Boolean
true. If you set enabled to false for a container, Flex dims the color of the container and of all of its children, and blocks user input to the container and to all of its children.
errorString:
String
tabEnabled:
Boolean
tabIndex:
Number
static
version:
String
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flex/15/asdocs_en/mx/core/UIComponent.html
Comments
gumnam said on Jul 18, 2005 at 3:02 PM : mr_dan said on Aug 9, 2006 at 7:36 PM :