home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  

A.8 HList - Hierarchical List

This widget is part of the Tix distribution and is supported by Perl/Tk just like any other Tk widget. Table A.14 shows the properties.

Table A.14: HList Methods and Properties




Specifies a reference to a Perl subroutine, which is called when an entry is double clicked upon.


If true, draws lines connecting parent and children and sibling entries.


Called whenever any mouse click or drag event happens over an entry.


Each level of indentation is a column. Column sizes can be individually tailored.


The separator character. Defaults to "."


single , browse , multiple , or extended .


Indent amount for each successive level, in pixels.


add (entrypath, option, values)

Creates a new entry. The options can be at position , before path , after path , and all the entry properties discussed below.

delete (option, entrypath)

Option can be all , entry , offsprings , siblings

column (col, width)

column (col, `char', nchars)

Set the width in pixels or in terms of character widths.

entryconfigure, entrycget

Set/get the entry properties discussed below.

info (option, entryPath)

Option can be children , exists , hidden , next , prev , selection , and so on.

hide, show

Hide or show an entry

Entry Properties


text , imagetext , and widget .


The label of that entry.


A bitmap or a pixmap. Used if itemtype is imagetext .

Note that this is a scrollable widget, so it also supports the generic xscrollcommand and yscrollcommand properties listed in Table A.12 . This also means that a simple way to create a scrolled HList box is to call $ parent ->ScrlHList( options ) .