summaryrefslogtreecommitdiffstats
path: root/doc/ttk_treeview.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-10-30 21:29:58 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-10-30 21:29:58 (GMT)
commitf9705d9d3162582585108a3e60dc8164e5e73d74 (patch)
tree7090d93b57cff685ebe7ccea984672560fa3b271 /doc/ttk_treeview.n
parente3d080ec8d965eb9ad0e606c90f01b9af73facb3 (diff)
downloadtk-f9705d9d3162582585108a3e60dc8164e5e73d74.zip
tk-f9705d9d3162582585108a3e60dc8164e5e73d74.tar.gz
tk-f9705d9d3162582585108a3e60dc8164e5e73d74.tar.bz2
More documentation improvements
Diffstat (limited to 'doc/ttk_treeview.n')
-rw-r--r--doc/ttk_treeview.n56
1 files changed, 33 insertions, 23 deletions
diff --git a/doc/ttk_treeview.n b/doc/ttk_treeview.n
index e5caf3b..ef3ad9f 100644
--- a/doc/ttk_treeview.n
+++ b/doc/ttk_treeview.n
@@ -4,7 +4,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: ttk_treeview.n,v 1.10 2007/10/29 16:04:14 dkf Exp $
+'\" RCS: @(#) $Id: ttk_treeview.n,v 1.11 2007/10/30 21:29:59 dkf Exp $
'\"
.so man.macros
.TH ttk_treeview n 8.5 Tk "Tk Themed Widget"
@@ -14,7 +14,6 @@ ttk_treeview \- hierarchical multicolumn data display widget
.SH SYNOPSIS
\fBttk::treeview\fR \fIpathname \fR?\fIoptions\fR?
.BE
-
.SH DESCRIPTION
The \fBttk::treeview\fR widget displays a hierarchical collection of items.
Each item has a textual label, an optional image,
@@ -48,7 +47,6 @@ and [\fBxy\fR]\fBview\fR widget commands.
\-class \-cursor \-takefocus \-style
\-xscrollcommand \-yscrollcommand
.SE
-
.SH "WIDGET-SPECIFIC OPTIONS"
.OP \-columns columns Columns
A list of column identifiers,
@@ -60,8 +58,11 @@ A list of column identifiers
specifying which data columns are displayed
and the order in which they appear,
or the string \fB#all\fP.
-.br
-If set to \fB#all\fP (the default), all columns are shown in the order given.
+.RS
+.PP
+If set to \fB#all\fP (the default), all columns are shown in the order
+given.
+.RE
.OP \-height height Height
Specifies the number of rows which should be visible.
Note:
@@ -73,13 +74,15 @@ see \fBTtk_GetPaddingFromObj()\fR for details.
.OP \-selectmode selectMode SelectMode
Controls how the built-in class bindings manage the selection.
One of \fBextended\fR, \fBbrowse\fR, or \fBnone\fR.
-.br
+.RS
+.PP
If set to \fBextended\fR (the default), multiple items may be selected.
If \fBbrowse\fR, only a single item will be selected at a time.
If \fBnone\fR, the selection will not be changed.
-.br
+.PP
Note that application code and tag bindings can set the selection
however they wish, regardless of the value of \fB\-selectmode\fR.
+.RE
.OP \-show show Show
A list containing zero or more of the following values, specifying
which elements of the tree to display.
@@ -94,7 +97,6 @@ The default is \fBtree headings\fR, i.e., show all elements.
\fBNOTE:\fR Column #0 always refers to the tree column,
even if \fB\-show tree\fR is not specified.
.RE
-
.SH "WIDGET COMMAND"
.TP
\fIpathname \fBbbox\fR \fIitem\fR ?\fIcolumn\fR?
@@ -112,13 +114,15 @@ Returns the current value of the specified \fIoption\fR; see \fIttk_widget(n)\fR
\fIpathname \fBchildren\fR \fIitem\fR ?\fInewchildren\fR?
If \fInewchildren\fR is not specified,
returns the list of children belonging to \fIitem\fR.
-.br
+.RS
+.PP
If \fInewchildren\fR is specified, replaces \fIitem\fR's child list
with \fInewchildren\fR.
Items in the old child list not present in the new child list
are detached from the tree.
None of the items in \fInewchildren\fR may be an ancestor
of \fIitem\fR.
+.RE
.TP
\fIpathname \fBcolumn\fR \fIcolumn\fR ?\fI\-option \fR?\fIvalue \-option value...\fR?
Query or modify the options for the specified \fIcolumn\fR.
@@ -240,10 +244,12 @@ it is inserted at the end.
If \fB\-id\fR is specified, it is used as the item identifier;
\fIid\fR must not already exist in the tree.
Otherwise, a new unique identifier is generated.
-.br
+.RS
+.PP
\fIpathname \fBinsert\fR returns the item identifier of the
newly created item.
See \fBITEM OPTIONS\fR for the list of available options.
+.RE
.TP
\fIpathname \fBinstate \fIstatespec\fR ?\fIscript\fR?
Test the widget state; see \fIttk_widget(n)\fR.
@@ -260,10 +266,12 @@ See \fBITEM OPTIONS\fR for the list of available options.
\fIpathname \fBmove \fIitem parent index\fR
Moves \fIitem\fR to position \fIindex\fR in \fIparent\fR's list of children.
It is illegal to move an item under one of its descendants.
-.br
+.RS
+.PP
If \fIindex\fR is less than or equal to zero, \fIitem\fR is moved
to the beginning; if greater than or equal to the number of children,
-it's moved to the end.
+it is moved to the end.
+.RE
.TP
\fIpathname \fBnext \fIitem\fR
Returns the identifier of \fIitem\fR's next sibling,
@@ -301,7 +309,7 @@ Remove \fIitemList\fR from the selection
Toggle the selection state of each item in \fIitemList\fR.
.RE
.TP
-\fIpathname \fBset\fR \fIitem\fR ?\fIcolumn\fR ?\fIvalue\fR??
+\fIpathname \fBset\fR \fIitem\fR ?\fIcolumn\fR? ?\fIvalue\fR?
With one argument, returns a dictionary of column/value pairs
for the specified \fIitem\fR.
With two arguments, returns the current value of the specified \fIcolumn\fR.
@@ -315,20 +323,22 @@ Modify or query the widget state; see \fIttk_widget(n)\fR.
\fIpathName \fBtag \fIargs...\fR
.RS
.TP
-\fIpathName \fBtag bind \fItagName \fR?\fIsequence \fR?\fIscript\fR??
+\fIpathName \fBtag bind \fItagName \fR?\fIsequence\fR? ?\fIscript\fR?
Add a Tk binding script for the event sequence \fIsequence\fR
to the tag \fItagName\fR. When an X event is delivered to an item,
binding scripts for each of the item's \fB\-tags\fR are evaluated
in order as per \fIbindtags(n)\fR.
-.br
+.RS
+.PP
\fB<KeyPress>\fR, \fB<KeyRelease>\fR, and virtual events
are sent to the focus item.
\fB<ButtonPress>\fR, \fB<ButtonRelease>\fR, and \fB<Motion>\fR events
are sent to the item under the mouse pointer.
No other event types are supported.
-.br
+.PP
The binding \fIscript\fR undergoes \fB%\fR-substitutions before
evaluation; see \fBbind(n)\fR for details.
+.RE
.TP
\fIpathName \fBtag configure\fR ?\fIoption\fR? ?\fIvalue option value ...\fR?
Query or modify the options for the specified \fItagName\fR.
@@ -347,8 +357,6 @@ Standard command for horizontal scrolling; see \fIwidget(n)\fR.
.TP
\fIpathName \fByview \fIargs\fR
Standard command for vertical scrolling; see \fIttk_widget(n)\fR.
-
-.PP
.SH "ITEM OPTIONS"
The following item options may be specified for items
in the \fBinsert\fR and \fBitem\fR widget commands.
@@ -358,13 +366,15 @@ The textual label to display for the item.
A Tk image, displayed to the left of the label.
.OP \-values values Values
The list of values associated with the item.
-.br
+.RS
+.PP
Each item should have the same number of values as
the \fB\-columns\fR widget option.
If there are fewer values than columns,
the remaining values are assumed empty.
If there are more values than columns,
the extra values are ignored.
+.RE
.OP \-open open Open
A boolean value indicating whether the item's children
should be displayed (\fB\-open true\fR) or hidden (\fB\-open false\fR).
@@ -372,16 +382,16 @@ should be displayed (\fB\-open true\fR) or hidden (\fB\-open false\fR).
A list of tags associated with this item.
.SH "TAG OPTIONS"
The following options may be specified on tags:
-.IP \-foreground
+.IP \fB\-foreground\fR
Specifies the text foreground color.
-.IP \-background
+.IP \fB\-background\fR
Specifies the cell or item background color.
-.IP \-font
+.IP \fB\-font\fR
Specifies the font to use when drawing text.
.\" ??? Maybe: .IP \-anchor
.\" ??? Maybe: .IP \-padding
.\" ??? Maybe: .IP \-text
-.IP \-image
+.IP \fB\-image\fR
Specifies the item image, in case the item's \fB\-image\fR option is empty.
.PP
\fI(@@@ TODO: sort out order of precedence for options)\fR