![]() |
![]() |
||||||
|
|||||||
A tool bar is often used to present controls that must be readily accessible and always visible. A tool bar is represented by the toolBar element type. Tool Bar Layout A tool bar is a first class container, where you can put any type of presentation component, not just buttons. A tool bar automatically uses an instance of Box Layout as its layout manager. A tool bar’s orientation is horizontal, by default, but you can change that by setting orientation="vertical" for the toolBar element representing the tool bar. A user can tear off a tool bar from its parent container, and make it float in its own window. You can suppress this behavior by setting floatable="false" for the toolBar element. Currently, you also lose the ability to tear off a tool bar if you explicitly set the border attribute of the toolBar element, but this behavior may change in a future release. Example The following example shows how to add buttons to a tool bar. To see how to attach actions to buttons, look here. Make this object in eNode Sandbox. The result should be similar to the following: ![]() Try gripping the tool bar and tearing it off into a separate floating window. |
|||||||
|
Copyright © 2002 eNode, Inc. All Rights Reserved. |