summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authortreectrl <treectrl>2007-10-23 23:04:33 (GMT)
committertreectrl <treectrl>2007-10-23 23:04:33 (GMT)
commited2e8278356d18cb4b57015b96d1495e0a7f471c (patch)
treea06c63599fe70223689b3f9899986c9148e61759 /doc
parent0f6799658c90e04b4d19886049c95d43ad2fbb0b (diff)
downloadtktreectrl-ed2e8278356d18cb4b57015b96d1495e0a7f471c.zip
tktreectrl-ed2e8278356d18cb4b57015b96d1495e0a7f471c.tar.gz
tktreectrl-ed2e8278356d18cb4b57015b96d1495e0a7f471c.tar.bz2
Added some comments about the importance of order in per-state options. [BUG 1816723]
Diffstat (limited to 'doc')
-rw-r--r--doc/treectrl.html17
-rw-r--r--doc/treectrl.man15
-rw-r--r--doc/treectrl.n17
3 files changed, 45 insertions, 4 deletions
diff --git a/doc/treectrl.html b/doc/treectrl.html
index 427b705..bee1e6f 100644
--- a/doc/treectrl.html
+++ b/doc/treectrl.html
@@ -1,10 +1,10 @@
-<! -- Copyright (c) 2002-2003 Christian Krone. -- -- See the file &quot;license.terms&quot; for information on usage and redistribution -- of this file, and for a DISCLAIMER OF ALL WARRANTIES. -- -- $Id: treectrl.html,v 1.50 2007/02/06 22:27:35 treectrl Exp $
+<! -- Copyright (c) 2002-2003 Christian Krone. -- -- See the file &quot;license.terms&quot; for information on usage and redistribution -- of this file, and for a DISCLAIMER OF ALL WARRANTIES. -- -- $Id: treectrl.html,v 1.51 2007/10/23 23:04:33 treectrl Exp $
--><html><head>
<title>treectrl - Tk Commands </title>
</head>
<! -- Generated from file 'doc/treectrl.man' by tcllib/doctools with format 'html'
-->
-<! -- CVS: $Id: treectrl.html,v 1.50 2007/02/06 22:27:35 treectrl Exp $ treectrl.n
+<! -- CVS: $Id: treectrl.html,v 1.51 2007/10/23 23:04:33 treectrl Exp $ treectrl.n
-->
<body>
@@ -3400,6 +3400,19 @@ In the example above, the <strong>rect</strong> element is filled with blue when
has the focus and the item is selected. If the treectrl does not have the focus, the
example specifies that gray should be used for selected items. Also note that if the
item is not selected, no color is specified for the -fill option.
+<p>
+Each value-stateList pair is checked in order from left to right. The value
+associated with the first stateList that matches the current item state is
+used. So stateLists should be listed from most-specific to least-specific.
+<p><table><tr><td bgcolor=black>&nbsp;</td><td><pre class='sample'>
+$T element configure MyRectElement -fill {gray {selected} blue {selected focus}}
+</pre></td></tr></table></p>
+Written this way, gray will always be used for selected items since
+it appears first, and blue will never be used for selected items regardless
+of the focus.
+<p>
+A value followed by an empty stateList should always be last since it will be
+chosen regardless of the item's state.
<h2><a name="elements">ELEMENTS</a></h2>
<p>
diff --git a/doc/treectrl.man b/doc/treectrl.man
index 1723088..a1ce326 100644
--- a/doc/treectrl.man
+++ b/doc/treectrl.man
@@ -3,7 +3,7 @@
See the file "license.terms" for information on usage and redistribution
of this file, and for a DISCLAIMER OF ALL WARRANTIES.
- $Id: treectrl.man,v 1.50 2007/02/06 22:27:35 treectrl Exp $}
+ $Id: treectrl.man,v 1.51 2007/10/23 23:04:33 treectrl Exp $}
][manpage_begin treectrl n 2.2.3]
[moddesc {Tk Commands}]
[titledesc {Create and manipulate hierarchical multicolumn widgets}]
@@ -2652,6 +2652,19 @@ In the example above, the [const rect] element is filled with blue when the tree
has the focus and the item is selected. If the treectrl does not have the focus, the
example specifies that gray should be used for selected items. Also note that if the
item is not selected, no color is specified for the -fill option.
+[para]
+Each value-stateList pair is checked in order from left to right. The value
+associated with the first stateList that matches the current item state is
+used. So stateLists should be listed from most-specific to least-specific.
+[example_begin]
+$T element configure MyRectElement -fill {gray {selected} blue {selected focus}}
+[example_end]
+Written this way, gray will always be used for selected items since
+it appears first, and blue will never be used for selected items regardless
+of the focus.
+[para]
+A value followed by an empty stateList should always be last since it will be
+chosen regardless of the item's state.
[section ELEMENTS]
Elements are the smallest building blocks
diff --git a/doc/treectrl.n b/doc/treectrl.n
index 8359a07..932421f 100644
--- a/doc/treectrl.n
+++ b/doc/treectrl.n
@@ -6,7 +6,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" $Id: treectrl.n,v 1.67 2007/02/06 22:27:35 treectrl Exp $
+'\" $Id: treectrl.n,v 1.68 2007/10/23 23:04:33 treectrl Exp $
.so man.macros
.TH "treectrl" n 2.2.3 treectrl "Tk Commands"
.BS
@@ -3185,6 +3185,21 @@ In the example above, the \fBrect\fR element is filled with blue when the treect
has the focus and the item is selected. If the treectrl does not have the focus, the
example specifies that gray should be used for selected items. Also note that if the
item is not selected, no color is specified for the -fill option.
+.PP
+Each value-stateList pair is checked in order from left to right. The value
+associated with the first stateList that matches the current item state is
+used. So stateLists should be listed from most-specific to least-specific.
+.nf
+
+$T element configure MyRectElement -fill {gray {selected} blue {selected focus}}
+
+.fi
+Written this way, gray will always be used for selected items since
+it appears first, and blue will never be used for selected items regardless
+of the focus.
+.PP
+A value followed by an empty stateList should always be last since it will be
+chosen regardless of the item's state.
.SH ELEMENTS
Elements are the smallest building blocks
which are handled by a treectrl widget.