Mar 31 2010
uiFrame: ActionScript 3.0 GroupBox
It is often overlooked, but the uiFrame component in the Aspire UI toolkit essentially has the same utility as the GroupBox in WPF (Windows Presentation Foundation).
A GroupBox displays a border/frame around a group of controls, with or without a caption/title. This is typically done to provide visual feedback to end-users that a collection of controls on a form is logically grouped.
When using the Aspire UI toolkit in ActionScript 3.0 projects, you can use the uiFrame component for the same results.
// ActionScript 3.0 var fruit0:uiCheckBox = new uiCheckBox("Apple"); var fruit1:uiCheckBox = new uiCheckBox("Banana"); var fruit2:uiCheckBox = new uiCheckBox("Orange"); var fruitsBox:uiBox = new uiBox(); fruitsBox.vertical = true; fruitsBox.spacing = 4; fruitsBox.addChild(new uiText("You can choose one or more fruits!")); fruitsBox.addChild(fruit0); fruitsBox.addChild(fruit1); fruitsBox.addChild(fruit2); var frm:uiFrame = new uiFrame(); frm.content = fruitsBox; frm.x = 10; frm.y = 10; frm.title = new uiText("Fruits"); addChild(frm);

Using the “graylic” theme, the result would be as follows:

Notice that the caption (title) is left aligned by default. You can adjust the alignment by specifying the alignX property:
frm.title = new uiText("Fruits"); frm.title.alignX = ALIGN.CENTER;

Using the “classic” theme with background set to gray, the result would be as follows:

Aspire UI Components
Aspire UI is a library of Actionscript 3.0 (AS3) classes for building flexible and lightweight UI elements in Adobe Flash applications. Key features of the components include easy skinning using PNG image files, automatic tab focus ordering, CSS text styles, and layout management.
This is a pure AS3 library with no dependency on the Flex framework.
For more information, please click here.
You may experiment with the various features by downloading the trial version.







