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 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289
|
<html>
<head>
<title>Interactive Tablelist Cell Editing Using Tile Widgets</title>
<meta name="Author" content="Csaba Nemethi">
<meta name="Keywords" content="tablelist, editing, tile">
</head>
<body bgcolor="#FFFFFF">
<div align="center">
<h1>Interactive Tablelist Cell Editing Using Tile Widgets</h1>
<h2>For Tablelist Version 5.7</h2>
<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="#entry">Interactive Cell Editing Using the tile entry
Widget</a></li>
<li><a href="#spinbox">Interactive Cell Editing Using the tile spinbox
Widget</a></li>
<li><a href="#combobox">Interactive Cell Editing Using the tile combobox
Widget</a></li>
<li><a href="#checkbutton">Interactive Cell Editing Using the tile
checkbutton Widget</a></li>
<li><a href="#menubutton">Interactive Cell Editing Using the tile
menubutton Widget</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 tile theme engine is a compiled library extension for Tcl/Tk versions
8.4 or higher. Beginning with Tk 8.5a6, tile is integrated into the Tk
core. For earlier Tk versions it can be downloaded from the address</p>
<blockquote>
<address>
<a href=
"http://sourceforge.net/projects/tktable/">http://sourceforge.net/projects/tktable/</a>
</address>
</blockquote>
<p>Tablelist supports interactive cell editing with the aid of the tile
entry, spinbox, combobox, checkbutton, and menubutton widgets, accessed as
<code><b>ttk::entry</b></code>, <code><b>ttk::spinbox</b></code>,
<code><b>ttk::combobox</b></code>, <code><b>ttk::checkbutton</b></code>, and
<code><b>ttk::menubutton</b></code>, respectively. The version of the
tile package must be 0.6 or higher (the tile spinbox requires even tile 0.8.3
or later, or, alternatively, Tk 8.6 or later). These widgets are
automatically registered for cell editing, hence the only action needed for
using one of them for editing the cells of a given column is as follows:</p>
<p>Use the tablelist widget's <code><b><a href=
"tablelistWidget.html#columnconfigure">columnconfigure</a></b></code>
subcommand to set the given column's <code><b><a href=
"tablelistWidget.html#col_editable">-editable</a></b></code> option to true
and its <code><b><a href=
"tablelistWidget.html#col_editwindow">-editwindow</a></b></code> option to
<code><b>ttk::entry</b></code>, <code><b>ttk::spinbox</b></code>,
<code><b>ttk::combobox</b></code>, <code><b>ttk::checkbutton</b></code>, or
<code><b>ttk::menubutton</b></code>, respectively. (These options are
supported at cell level, too, with the aid of the <code><b><a href=
"tablelistWidget.html#cellconfigure">cellconfigure</a></b></code>
subcommand.)</p>
<p>One known limitation of the currently available tile versions is that
the <code><b>style theme use</b></code> command can only be used
to set the current theme, but not to retrieve it. For this reason,
Tablelist makes use of the variable <code><b>ttk::currentTheme</b></code> or
<code><b>tile::currentTheme</b></code> (depending on the tile version), which
is set by the <code><b>ttk::setTheme</b></code> or
<code><b>tile::setTheme</b></code> procedure. From this it follows that
the tile widgets used for interactive cell editing will only be managed as
expected if the platform-specific default theme is either left unchanged or
replaced with another theme by invoking the procedure
<code><b>ttk::currentTheme</b></code> or <code><b>tile::setTheme</b></code>,
depending on the current tile version. (See also the <code><b><a href=
"tablelistThemes.html#setTheme">tablelist::setTheme</a></b></code>
command.)</p>
<div align="center">
<p><a href="#contents">Contents</a> <a href=
"index.html">Start page</a></p>
</div>
<hr>
<h2><a name="entry"></a>Interactive Cell Editing Using the tile entry
Widget</h2>
<dl>
<dt><b>DESCRIPTION</b></dt>
<dd>
The temporary embedded tile entry widget used for interactive cell
editing will be created with an explicitly set value for its
<code><b>-style</b></code> option. Apart from its theme-specific
appearance, it behaves just like its Tk core counterpart.
<p>If an application uses the tile entry widget for interactive cell
editing and also the Wcb package (even if not for that widget), then the
version of Wcb must be 3.1 or higher (because earlier Wcb releases didn't
support any tile widgets).</p>
</dd>
<dt><b>KEYWORDS</b></dt>
<dd>tablelist, editing, tile, entry</dd>
</dl>
<div align="center">
<p><a href="#contents">Contents</a> <a href=
"index.html">Start page</a></p>
</div>
<hr>
<h2><a name="spinbox"></a>Interactive Cell Editing Using the tile spinbox
Widget</h2>
<dl>
<dt><b>DESCRIPTION</b></dt>
<dd>
The temporary embedded tile spinbox widget used for interactive cell
editing will be created with an explicitly set value for its
<code><b>-style</b></code> option and with its <code><b>-state</b></code>
option set to <code><b>normal</b></code>, which makes the widget
editable. You can use the script corresponding to the
<code><b><a href=
"tablelistWidget.html#editstartcommand">-editstartcommand</a></b></code>
tablelist configuration option to set the state of the spinbox to
<code><b>readonly</b></code> or define validations for it, as well as for
setting its (range of) values and its <code><b>-wrap</b></code>
option. Apart from its theme-specific appearance, it behaves just
like its Tk core counterpart.
<p>If an application uses the tile spinbox widget for interactive cell
editing and also the Wcb package (even if not for that widget), then the
version of Wcb must be 3.2 or higher (because the support for the new
tile spinbox widget was added to Wcb in its version 3.2).</p>
</dd>
<dt><b>KEYWORDS</b></dt>
<dd>tablelist, editing, tile, spinbox</dd>
</dl>
<div align="center">
<p><a href="#contents">Contents</a> <a href=
"index.html">Start page</a></p>
</div>
<hr>
<h2><a name="combobox"></a>Interactive Cell Editing Using the tile combobox
Widget</h2>
<dl>
<dt><b>DESCRIPTION</b></dt>
<dd>
The temporary embedded tile combobox widget used for interactive cell
editing will be created with an explicitly set value for its
<code><b>-style</b></code> option and with its <code><b>-state</b></code>
option set to <code><b>normal</b></code>, which makes the widget
editable. You can use the script corresponding to the
<code><b><a href=
"tablelistWidget.html#editstartcommand">-editstartcommand</a></b></code>
tablelist configuration option to set the state of the combobox to
<code><b>readonly</b></code> or define validations for it, as well as for
populating its listbox component (with the aid of the combobox widget's
<code><b>-values</b></code> option).
<p>If an application uses the tile combobox widget for interactive cell
editing and also the Wcb package (even if not for that widget), then the
version of Wcb must be 3.1 or higher (because earlier Wcb releases didn't
support any tile widgets).</p>
</dd>
<dt><b>KEYWORDS</b></dt>
<dd>tablelist, editing, tile, combobox</dd>
</dl>
<div align="center">
<p><a href="#contents">Contents</a> <a href=
"index.html">Start page</a></p>
</div>
<hr>
<h2><a name="checkbutton"></a>Interactive Cell Editing Using the tile
checkbutton Widget.</h2>
<dl>
<dt><b>DESCRIPTION</b></dt>
<dd>The temporary embedded tile checkbutton widget used for interactive
cell editing will be created with explicitly set values for its
<code><b>-style</b></code> and <code><b>-variable</b></code> options.
You can use the script corresponding to the <code><b><a href=
"tablelistWidget.html#editstartcommand">-editstartcommand</a></b></code>
tablelist configuration option to set any other configuration options, like
<code><b>-offvalue</b></code> and <code><b>-onvalue</b></code>, according
to the <i>internal</i> values of the cells. Since the default values
of the <code><b>-offvalue</b></code> and <code><b>-onvalue</b></code> tile
checkbutton options are <code>0</code> and <code>1</code>, you don't need
to change these options if the cells have the same internal values
<code>0</code> and <code>1</code>.</dd>
<dt><br>
<b>KEYWORDS</b></dt>
<dd>tablelist, editing, tile, checkbutton</dd>
</dl>
<hr>
<h2><a name="menubutton"></a>Interactive Cell Editing Using the tile
menubutton Widget.</h2>
<dl>
<dt><b>DESCRIPTION</b></dt>
<dd>The temporary embedded tile menubutton widget used for interactive
cell editing will be created with explicitly set values for its
<code><b>-style</b></code> and <code><b>-textvariable</b></code>
options. In addition, a menu with its <code><b>-tearoff</b></code>
option set to <code>0</code> and an appropriate script as the value of its
<code><b>-postcommand</b></code> option is created and set as the value of
the menubutton's <code><b>-menu</b></code> option. In an X11
environment, the menu's appearance is adapted to that of the tablelist
widget by setting its <code><b>-background</b></code>,
<code><b>-foreground</b></code>, <code><b>-activebackground</b></code>,
<code><b>-activeforeground</b></code>, and
<code><b>-activeborderwidth</b></code> options to appropriate values.
You can use the script corresponding to the <code><b><a href=
"tablelistWidget.html#editstartcommand">-editstartcommand</a></b></code>
tablelist configuration option to set any other options of the menubutton
and/or its associated menu. You will, however, need this script in
the first place for populating the menu, preferably with radiobutton
entries. For every radiobutton entry added to the menu, the Tablelist
implementation will make sure that its value (which can be specified by
setting the entry's <code><b>-value</b></code> or
<code><b>-label</b></code> option) will be displayed in the menubutton as
its text when the entry is selected. (Tablelist achieves this by
setting the menu entry's <code><b>-variable</b></code> option to the value
of the menubutton's <code><b>-textvariable</b></code> option.) For
menu entries of types other than radiobutton (e.g., for command entries) it
is the responsibility of the application to make sure that the selected
entry's text will be shown in the menubutton (for example, with the aid of
the menu entry's <code><b>-command</b></code> option).</dd>
<dt><br>
<b>KEYWORDS</b></dt>
<dd>tablelist, editing, tile, menubutton</dd>
</dl>
<div align="center">
<p><a href="#contents">Contents</a> <a href=
"index.html">Start page</a></p>
</div>
</body>
</html>
|