O'Reilly logo

Tcl/Tk in a Nutshell by Jeff Tranter, Paul Raines

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

hierbox

hierbox pathName [option value...]

The hierbox command creates a new hierbox widget named pathName. A hierbox widget displays a hierarchy tree of entries for navigation and selection. Each entry consists of an icon image, a text label, and an optional text or image data field. Also, an entry can contain a list of subentries, which in turn can have their own subentries. Entries with subentries can be expanded or collapsed using an optional open/close button drawn to the entry’s left side.

Standard Options

-activebackground

-activeforeground

-background

-borderwidth

-cursor

-exportselection

-font

-foreground

-highlightbackground

-highlightcolor

-highlightthickness

-relief

-selectbackground

-selectborderwidth

-selectForeground

-takefocus

-xscrollcommand

-yscrollcommand

Widget-Specific Options

-activerelief relief (activeRelief, Relief)

3D effect for the active entry.

-allowduplicates boolean (allowDuplicates, AllowDuplicates)

Whether entries with identical names are allowed. The default is true.

-autocreate boolean (autoCreate, AutoCreate)

Whether an entry’s ancestors should automatically be created and inserted if they do not exist when the entry is inserted. The default is false.

-closecommand command (closeCommand, CloseCommand)

Tcl command to evaluate when an entry is closed. The following percent sign substitutions are done on command:

%%

Replaced with a single percent sign

%n

Entry ID number of affected entry

%P

Full pathname of affected entry

%p

Tail part of the pathname of affected entry

%W

Pathname ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required