Package | com.ghostwire.ui.containers |
Class | public class uiForm |
Inheritance | uiForm ![]() ![]() ![]() |
uiForm
is a subclass of uiPane
and is responsible for implementing
defaultButton
and mnemonics (short-cut keys). This container does not do any layout, but
you may nest any hierarchy of layout containers within. Typically you would use uiForm
to
contain controls intended to share the same tab focus chain.
"defaultButton" Property
You can define a default uiPushButton
within a uiForm
via the
defaultButton
property. This default button will be activated when the ENTER
key is pressed while the uiForm
is active (ie when any of the child objects has focus).
The exception to this is if another uiPushButton
within the uiForm
is in
focus (because that button will be activated instead) or if a multiline TextField
object
is in focus (because the ENTER
key will be used to insert carriage returns instead).
"skin" Property
Always null
- attempting to set this property will throw an error.
Mnemonics
Quick access keys to controls within a uiForm
can be registered via the
setMnemonicKey()
method. While the uiForm
is active, hitting a registered
alphabet (case-insensitive) on the keyboard will shift focus to the pre-defined control. The exception
to this is if a TextField
object is in focus (because hitting keys will be sent to the
TextField
instead).
~ This class is available in Aspire UI Components Lite Edition ~
Property | Defined by | ||
---|---|---|---|
![]() | alignX : Number
Indicates how the component would like to be aligned horizontally within its allocated space.
| uiComponent | |
![]() | alignY : Number
Indicates how the component would like to be aligned vertically within its allocated space.
| uiComponent | |
![]() | background : Object
Indicates the style of the background for this component.
| uiComponent | |
![]() | container : uiComponent
Indicates the
uiComponent instance that contains this instance. | uiComponent | |
defaultButton : uiPushButton
Indicates the
uiPushButton instance that should be activated when this
uiForm is active and the ENTER key is pressed. | uiForm | ||
![]() | depth : int
Indicates how deep the component is in the containment hierarchy.
| uiComponent | |
![]() | desiredAllocationHeight : int
Indicates the vertical space this component would like to be allocated.
| uiComponent | |
![]() | desiredAllocationWidth : int
Indicates the horizontal space this component would like to be allocated.
| uiComponent | |
![]() | enabled : Boolean
Indicates whether the component is enabled for user interaction.
| uiComponent | |
![]() | fillX : Boolean
Indicates whether or not the component should automatically expand or shrink to fill its allocated
horizontal space.
| uiComponent | |
![]() | fillY : Boolean
Indicates whether or not the component should automatically expand or shrink to fill its allocated
vertical space.
| uiComponent | |
![]() | focusPadding : Object
Indicates the thickness of the interior space from the edge of the component to the focus
rectangle.
| uiComponent | |
![]() | focusRect : Object
Indicates the class to use when rendering the rectangle around the component to indicate that it
is in focus.
| uiComponent | |
![]() | height : Number
Indicates the current
height of the component. | uiComponent | |
![]() | margin : Object
Indicates the thickness of the space surrounding the component.
| uiComponent | |
![]() | maxHeight : int
Indicates the upper limit for
height . | uiComponent | |
![]() | maxWidth : int
Indicates the upper limit for
width . | uiComponent | |
![]() | minHeight : int
Indicates the lower limit for
height . | uiComponent | |
![]() | minWidth : int
Indicates the lower limit for
width . | uiComponent | |
![]() | padding : Object
Indicates the thickness of the interior space from the edge of the component to the content area,
which is where child components, if any, are contained.
| uiComponent | |
![]() | skin : String
Indicates the name of the skin to use for this component instance.
| uiComponent | |
![]() | stretch : Boolean
Indicates whether surplus space available in the parent container should be allocated to this
component.
| uiComponent | |
![]() | textStyle : String
Indicates the style to use for
uiText instances contained in this component. | uiComponent | |
![]() | toolTip : Object
Indicates the content (text) of the tooltip that should be shown when the mouse hovers
over this control.
| uiComponent | |
![]() | uiskin : uiBitmapImage
Returns the
uiBitmapImage rendered as the skin - for advanced users only. | uiComponent | |
![]() | visible : Boolean
Indicates whether or not the component is visible within its container.
| uiComponent | |
![]() | width : Number
Indicates the current
width of the component. | uiComponent |
Method | Defined by | ||
---|---|---|---|
uiForm()
Constructor - creates a new
uiForm container instance. | uiForm | ||
![]() |
addChild(child:DisplayObject):DisplayObject
Adds a child
DisplayObject instance to this container. | uiPane | |
![]() |
addChildAt(child:DisplayObject, index:int):DisplayObject
Adds a child
DisplayObject instance to this container at the
specified index position. | uiPane | |
![]() |
invalidate(type:String):void
Invalidates this component's "size", "display", "layout" or "textstyle".
| uiComponent | |
![]() |
move(x:Number, y:Number, noEvent:Boolean = false):void
Moves the component to the specified position, disregarding its allocation.
| uiComponent | |
![]() |
removeAllChildren(all:Boolean = false):void
Removes all children from this component.
| uiComponent | |
![]() |
setFocus(flag:Boolean = true):void
Gives this component instance the focus; the component must be on the display list and has its
tabEnabled property set to true , otherwise this method will fail
silently. | uiComponent | |
setMnemonicKey(key:String, obj:InteractiveObject, textObj:uiText = null):void
Registers an alphabet (case-insensitive) as a short-cut to the specified
InteractiveObject contained in this uiForm . | uiForm | ||
![]() |
setSize(width:Number, height:Number, noEvent:Boolean = false):void
Sets this component's size to the specified
width and height . | uiComponent | |
![]() |
setVisible(value:Boolean, noEvent:Boolean = false):void
Sets the visibility of this component instance, dispatching a "show" or "hide" event accordingly.
| uiComponent | |
![]() |
validateNow():void
Validates and render the component instance, and any component instances with
depth higher than itself in the validation queue, immediately. | uiComponent |
defaultButton | property |
defaultButton:uiPushButton
[read-write]
Indicates the uiPushButton
instance that should be activated when this
uiForm
is active and the ENTER
key is pressed.
The defaultButton
is rendered using its "emphasized" visual state when this
uiForm
is active (which happens when any of the child objects has focus).
However, this defaultButton
is not applicable if another
uiPushButton
within the uiForm is focused (because that uiPushButton
will catch the ENTER
key instead). It is also not applicable when the focus is
in a multiline TextField
object (because the ENTER
key will be used
to insert carriage returns instead).
The default value is undefined
.
public function get defaultButton():uiPushButton
public function set defaultButton(value:uiPushButton):void
uiForm | () | constructor |
public function uiForm()
Constructor - creates a new uiForm
container instance.
setMnemonicKey | () | method |
public function setMnemonicKey(key:String, obj:InteractiveObject, textObj:uiText = null):void
Registers an alphabet (case-insensitive) as a short-cut to the specified
InteractiveObject
contained in this uiForm
. When this uiForm
is active, hitting the alphabet on the keyboard together with the required modifier key(s) if any
will transfer focus to the specified InteractiveObject
.
As of Version 1.1, you may specify CTRL key modifiers by prefixing the following to the alphabet:
^ CTRL ^! CTRL ALT ^+ CTRL SHIFT ^!+ CTRL ALT SHIFTFor example, to indicate CTRL-SHIFT-Y, specify the
key
parameter as "^+Y".
Reminder: ALT key works only in Windows OS. It is recommended that you avoid using that modifier key.
Parameterskey:String — A single character String indicating the alphabet to register. As of Version 1.1,
you may also prefix the character with "^", "^!", "^+" or "^!+" to specify CTRL key modifiers.
|
|
obj:InteractiveObject — The InteractiveObject to associate with the specified key. Pass null
to remove a previously registered short-cut.
|
|
textObj:uiText (default = null ) — Optional. The uiText object associated with the InteractiveObject .
The method will attempt to underline the first character that matches the specified key in the
text of the uiText object.
|