utilitybar widget
Usage:
utilitybar widget-path ?options?
utilitybar is used to create a ``KDE look'' bar suitable for
menus, tools or other miscellaneous purposes.
Options
- -type tool|menu|misc
- specifies the purpose for the bar. This option is necessary so that
Ktk can make small adjustments to the bar height to make its
appearance more acceptable. Defaults to "menu".
- -menu menu-path
- specifies the widget path of a Tk menu which is posted when the
user clicks Button3 over the extreme left-hand end of the bar. This
could be used to implement moving the utilitybar by re-packing it.
See
kexample
for further details--although kexample does not implement
any call-backs (yet).
Once the bar has been created you should use the subwidget command
to find the pathname of the bar subwidget. Pack the objects
for the bar into this widget. See
the example code
below.
Finally, once the objects have been packed into the utilitybar, use the
decorate widget command to add the bar decoration.
Example
utilitybar .tools -type tool ;# create a toolbar
set tb [.tools subwidget bar] ;# find the bar subwidget path
toolbutton .tb1 -image idea.xpm ;# create a toolbutton
pack .tb1 -in $tb -side left ;# pack it into the bar
.tools decorate ;# and then decorate the bar
Ktk is maintained by
Andrew F. Lack
This page was last updated on 5th March 1999