3 Tabular Listbox and Display Items
3.1 tixTList -- The Tix Tabular Listbox Widget
TixTList
tlist.tex.html#3-1
3-1
(Figure 3-1) Files Displayed in a TixTList Widget in a Tabular Format
(Figure 3-2) Employee Names Displayed in a TixTList Widget
tlist.tex.html#3-1
3-1
tlist.tex.html#3-2
3-2
3.2 Display Items
tlist.tex.html#3-3
3-3
usr
same
tlist.tex.html#3-3
3-3
host
widgets
display items
(Figure 3-3) The Same Type of Items Displayed in a TixTList (left) and a
TixHList(right)
3.2.1 Advantages of Display Items
animation
3.2.2 Display Items and Display Styles
text
font
individual
collective
individual
attribute
collective attributes
font
(Figure 3-4) Relationship Between Display Items and Display Styles
display
styles
tlist.tex.html#3-4
3-4
text
style
tlist.tex.html#3-4
3-4
a
b
c
a
b
3.3 Creating Display Items in the TixTList Widget
3.3.1 Creating Display Items
insert
tixTList .t
pack .t
.t insert end -itemtype text -text "First Item"  -underline 0
.t insert end -itemtype text -text "Second Item" -underline 0
set picture [image create bitmap -file picture.xbm]
.t insert end -itemtype image -image $picture
insert
insert
0
1
end
-itemtype
text
image
imagetext
window
text
image
insert
3.3.2 Setting the Styles of the Display Items
.t insert end -itemtype text -text "First Item" -foreground black
-foreground
tixItemStyle
set style1 [tixDisplayStyle text -font 8x13]
set style2 [tixDisplayStyle text -font 8x13bold]
tixTList .t; pack .t
.t insert end -itemtype text -text "First Item"  -underline 0
-style $style1
.t insert end -itemtype text -text "Second Item" -underline 0
-style $style2
.t insert end -itemtype text -text "Third Item"  -underline 0
-style $style1
tixDisplayStyle
text
image
tixDisplayStyle
tixDisplayStyle
style1
style2
tlist.tex.html#3-5
3-5
-style
Three
text
items in a TixTList
The
text
items with fonts switched
(Figure 3-5) Two Display Styles With Different Fonts
tixDisplayStyle
$style1 configure -font 8x13bold
$style2 configure -font 8x13
tlist.tex.html#3-5
3-5
3.3.3 Configuring and Deleting the Items
entryconfigure
delete
One
Two
$style2
delete
.t entryconfigure 0 -text One
.t entryconfigure 2 -text Two
.t delete 1
3.3.4 Choosing the Orientation and Number of Rows or Columns
-orientation
-orientation
vertical
tlist.tex.html#3-6
3-6
-orientation
horizontal
tlist.tex.html#3-6
3-6
-orientation
vertical
-columns
-columns
-columns
-orientation
-columns
1
-columns
-rows
-orientation
horizontal
Vertical Orientation
Horizontal Orientation
(Figure 3-6) The
-orientation
option of the TixSelect Widget
3.3.5 Event Handling
-browsecmd
-command
-browsecmd
-command
3.3.6 Selection
-selectmode
single
browse
multiple
extended
extended
multiple
info selection
selection set
.tlist
selection set 3
3
.tlist selection set 2 10
2
10
selection clear
