1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162
|
<html>
<head>
<title>Helper Commands Used in Tablelist Binding Scripts</title>
<meta name="Author" content="Csaba Nemethi">
<meta name="Keywords" content="tablelist, binding script">
</head>
<body bgcolor="#FFFFFF">
<div align="center">
<h1>Helper Commands Used in Tablelist Binding Scripts</h1>
<h3>by</h3>
<h2>Csaba Nemethi</h2>
<address>
<a href="mailto:csaba.nemethi@t-online.de">csaba.nemethi@t-online.de</a>
</address>
</div>
<hr>
<h2><a name="contents"></a>Contents</h2>
<ul>
<li><a href="#overview">Overview</a></li>
<li><a href="#getTablelistPath">The
<code><b>tablelist::getTablelistPath</b></code> Command</a></li>
<li><a href="#convEventFields">The
<code><b>tablelist::convEventFields</b></code> Command</a></li>
</ul>
<div align="center">
<p><a href="index.html">Start page</a></p>
</div>
<hr>
<h2><a name="overview"></a>Overview</h2>
<p>The commands described in this reference page are used in the default
binding scripts associated with the binding tag
<code><b>TablelistBody</b></code>. It is recommended to use them also
in individual binding scripts for the binding tag whose name is returned by
the <code><b><a href="tablelistWidget.html#bodytag">bodytag</a></b></code>
subcommand of the Tcl command associated with a tablelist widget (see the
<a href="tablelistWidget.html#body_bindings">DEFAULT AND INDIVIDUAL BINDINGS
FOR THE TABLELIST BODY</a> section of the corresponding reference page for
details).</p>
<div align="center">
<p><a href="#contents">Contents</a> <a href=
"index.html">Start page</a></p>
</div>
<hr>
<h2><a name="getTablelistPath"></a>The
<code><b>tablelist::getTablelistPath</b></code> Command</h2>
<dl>
<dt><b>NAME</b></dt>
<dd><code>tablelist::getTablelistPath</code> - Get the path name of a
tablelist widget from the path name of one of its descendants</dd>
<dt><br>
<b>SYNOPSIS</b></dt>
<dd>
<pre>
<b>tablelist::getTablelistPath</b> <i>descendantPathName</i>
</pre>
</dd>
<dt><b>DESCRIPTION</b></dt>
<dd>This command gets the path name of a tablelist widget from the path
name <code><i>descendantPathName</i></code> of one of its descendants.</dd>
<dd><br>
In a binding script, the descendant widget corresponds to the event field
<code><b>%W</b></code>, which can be the tablelist's body, one of the
separator frames, a label widget displaying an embedded image, or (a
descendant of) an embedded window. The return value is often assigned
to the help variable <code><b>tablelist::W</b></code>.</dd>
<dt><br>
<b>KEYWORDS</b></dt>
<dd>tablelist, path name, binding script</dd>
</dl>
<div align="center">
<p><a href="#contents">Contents</a> <a href=
"index.html">Start page</a></p>
</div>
<hr>
<h2><a name="convEventFields"></a>The
<code><b>tablelist::convEventFields</b></code> Command</h2>
<dl>
<dt><b>NAME</b></dt>
<dd><code>tablelist::convEventFields</code> - Convert event fields relative
to a descendant of a tablelist widget</dd>
<dt><br>
<b>SYNOPSIS</b></dt>
<dd>
<pre>
<b>tablelist::convEventFields</b> <i>descendantPathName</i> <i>x</i> <i>y</i>
</pre>
</dd>
<dt><b>DESCRIPTION</b></dt>
<dd>This command gets the path name of a tablelist widget and the x and y
coordinates relative to the latter from the path name
<code><i>descendantPathName</i></code> of one of its descendants and from
the x and y coordinates <code><i>x</i></code>, <code><i>y</i></code>
relative to this descendant. The command returns these values as the
components of a list consisting of three elements.</dd>
<dd>
<br>
In a binding script, the descendant widget corresponds to the event field
<code><b>%W</b></code>, which can be the tablelist's body, one of the
separator frames, a label widget displaying an embedded image, or (a
descendant of) an embedded window. Likewise, the arguments
<code><i>x</i></code> and <code><i>y</i></code> correspond to the event
fields <code><b>%x</b></code> and <code><b>%y</b></code>. The three
elements of the list returned by the command are usually assigned to the
help variables <code><b>tablelist::W</b></code>,
<code><b>tablelist::x</b></code>, and <code><b>tablelist::y</b></code>,
by using the statement
<blockquote>
<pre>
foreach {tablelist::W tablelist::x tablelist::y} \
[tablelist::convEventFields %W %x %y] {}
</pre>
</blockquote>
</dd>
<dt><b>KEYWORDS</b></dt>
<dd>tablelist, event fields, binding script</dd>
</dl>
<div align="center">
<p><a href="#contents">Contents</a> <a href=
"index.html">Start page</a></p>
</div>
</body>
</html>
|