| Package | mx.controls |
| Class | public class ButtonBar |
| Inheritance | ButtonBar NavBar Box Container UIComponent FlexSprite Sprite DisplayObjectContainer InteractiveObject DisplayObject EventDispatcher Object |
| Implements | IFocusManagerComponent |
| Subclasses | ToggleButtonBar |
A push button is one that does not remember its selected state
when selected.
The typical use for a push button in a button bar is for grouping
a set of related buttons together, which gives them a common look
and navigation, and handling the logic for the click event
in a single place.
The ButtonBar control creates Button controls based on the value of
its dataProvider property.
Even though ButtonBar is a subclass of Container, do not use methods such as
Container.addChild() and Container.removeChild()
to add or remove Button controls.
Instead, use methods such as addItem() and removeItem()
to manipulate the dataProvider property.
The ButtonBar control automatically adds or removes the necessary children based on
changes to the dataProvider property.
To control the styling of the buttons of the ButtonBar control, use the
buttonStyleName, firstButtonStyleName,
and lastButtonStyleName style properties;
do not try to style the individual Button controls
that make up the ButtonBar control.
You can use the ToggleButtonBar control to define a group of toggle buttons.
MXML Syntax
Hide MXML Syntax
The <mx:ButtonBar> tag inherits all the tag attributes
of its superclass, and adds the following tag attributes:
<mx:ButtonBar
Styles
buttonHeight="undefined"
buttonStyleName="Name of CSS style declaration, which specifies
styles for the buttons"
buttonWidth="undefined"
firstButtonStyleName="The value of buttonStyleName"
focusAlpha="0.5"
focusRoundedCorners="tl tr bl br"
horizontalAlign="center|left|right"
horizontalGap="0"
lastButtonStyleName="The value of buttonStyleName"
verticalAlign="middle|top|bottom"
verticalGap="0"
Events
itemClick="No default"
>
...
child tags
...
</mx:ButtonBar>
Default MXML PropertydataProvider
See also
| Method | Defined by | ||
|---|---|---|---|
|
Constructor.
| ButtonBar | ||
![]() |
Adds a child DisplayObject to this Container.
| Container | |
![]() |
Adds a child DisplayObject to this Container.
| Container | |
![]() |
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener
receives notification of an event.
| EventDispatcher | |
![]() |
Indicates whether the security restrictions
would cause any display objects to be omitted from the list returned by calling
the
DisplayObjectContainer.getObjectsUnderPoint() method
with the specified point point. | DisplayObjectContainer | |
![]() |
Queues a function to be called later.
| UIComponent | |
![]() |
clearStyle(styleProp:String):void
Deletes a style property from this component instance.
| UIComponent | |
![]() |
Determines whether the specified display object is a child of the DisplayObjectContainer instance or
the instance itself.
| DisplayObjectContainer | |
![]() |
Converts a
Point object from content coordinates to global coordinates. | Container | |
![]() |
Converts a
Point object from content to local coordinates. | Container | |
![]() |
Returns a set of properties that identify the child within
this container.
| UIComponent | |
![]() |
Given a single UIComponentDescriptor, create the corresponding
component and add the component as a child of this Container.
| Container | |
![]() |
createComponentsFromDescriptors(recurse:Boolean = true):void
Iterate through the Array of
childDescriptors,
and call the createComponentFromDescriptor() method for each one. | Container | |
![]() |
createReferenceOnParentDocument(parentDocument:IFlexDisplayObject):void
Creates an
id reference to this IUIComponent object
on its parent document object. | UIComponent | |
![]() |
deleteReferenceOnParentDocument(parentDocument:IFlexDisplayObject):void
Deletes the
id reference to this IUIComponent object
on its parent document object. | UIComponent | |
![]() |
Returns a UITextFormat object corresponding to the text styles
for this UIComponent.
| UIComponent | |
![]() | UIComponent | ||
![]() |
Shows or hides the focus indicator around this component.
| UIComponent | |
![]() |
drawRoundRect(x:Number, y:Number, width:Number, height:Number, cornerRadius:Object = null, color:Object = null, alpha:Object = null, gradientMatrix:Matrix = null, gradientType:String = "linear", gradientRatios:Array = null, hole:Object = null):void
Programatically draws a rectangle into this skin's Graphics object.
| UIComponent | |
![]() |
effectFinished(effectInst:EffectInstance):void
Called by the effect instance when it stops playing on the component.
| UIComponent | |
![]() |
effectStarted(effectInst:EffectInstance):void
Called by the effect instance when it starts playing on the component.
| UIComponent | |
![]() |
endEffectsStarted():void
Ends all currently playing effects on the component.
| UIComponent | |
![]() |
executeBindings(recurse:Boolean = false):void
Executes all the data bindings on this Container.
| Container | |
![]() |
executeChildBindings(recurse:Boolean):void
Executes the bindings into this Container's child UIComponent objects.
| Container | |
![]() |
Called after printing is complete.
| UIComponent | |
![]() |
Provides the automation object at the specified index.
| UIComponent | |
![]() |
Returns a rectangle that defines the area of the display object relative to the coordinate system
of the
targetCoordinateSpace object. | DisplayObject | |
![]() |
Gets the nth child component object.
| Container | |
![]() |
Returns the child whose
name property is the specified String. | Container | |
![]() |
Gets the zero-based index of a specific child.
| Container | |
![]() |
Returns an Array of DisplayObject objects consisting of the content children
of the container.
| Container | |
![]() |
Finds the type selectors for this UIComponent instance.
| UIComponent | |
![]() |
A convenience method for determining whether to use the
explicit or measured height
| UIComponent | |
![]() |
A convenience method for determining whether to use the
explicit or measured width
| UIComponent | |
![]() |
Gets the object that currently has focus.
| UIComponent | |
![]() |
Returns an array of objects that lie under the specified point and are children
(or grandchildren, and so on) of this DisplayObjectContainer instance.
| DisplayObjectContainer | |
![]() |
Returns a rectangle that defines the boundary of the display object,
based on the coordinate system defined by the
targetCoordinateSpace
parameter, excluding any strokes on shapes. | DisplayObject | |
![]() |
Returns the item in the
dataProvider that was used
by the specified Repeater to produce this Repeater, or
null if this Repeater isn't repeated. | UIComponent | |
![]() |
Gets a style property that has been set anywhere in this
component's style lookup chain.
| UIComponent | |
![]() |
Converts a
Point object from global to content coordinates. | Container | |
![]() |
Converts the
point object from the Stage (global) coordinates
to the display object's (local) coordinates. | DisplayObject | |
![]() |
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event.
| EventDispatcher | |
![]() |
Evaluates the display object to see if it overlaps or intersects with the
obj display object. | DisplayObject | |
![]() |
Evaluates the display object to see if it overlaps or intersects with the
point specified by the
x and y parameters. | DisplayObject | |