| 1 |
<TITLE>iwidgets::disjointlistbox - Create and manipulate a disjointlistbox widget</TITLE> |
| 2 |
<H1>iwidgets::disjointlistbox - Create and manipulate a disjointlistbox widget</H1> |
| 3 |
|
| 4 |
</pre><H2>SYNOPSIS</H2> |
| 5 |
<B>iwidgets::disjointlistbox<I> <I>pathName </I>?<I>options</I>? |
| 6 |
</pre><H2>INHERITANCE</H2> |
| 7 |
itk::Widget <- iwidgets::Disjointlistbox |
| 8 |
</pre><H2>STANDARD OPTIONS</H2> |
| 9 |
<P> |
| 10 |
<table cellpadding=5> |
| 11 |
<td valign=top> |
| 12 |
<B><br> |
| 13 |
activeForeground<br> |
| 14 |
buttonPlacement<br> |
| 15 |
highlightColor<br> |
| 16 |
</td> |
| 17 |
<td valign=top> |
| 18 |
activeBackground<br> |
| 19 |
activeRelief<br> |
| 20 |
clientData<br> |
| 21 |
highlightThickness<br> |
| 22 |
</td> |
| 23 |
<td valign=top> |
| 24 |
selectBorderWidth<br> |
| 25 |
background<br> |
| 26 |
cursor<br> |
| 27 |
disabledForeground<br> |
| 28 |
</td> |
| 29 |
<td valign=top> |
| 30 |
selectForeground<br> |
| 31 |
borderWidth<br> |
| 32 |
foreground<br> |
| 33 |
elementBorderWidth</B></I><br> |
| 34 |
</td> |
| 35 |
</table> |
| 36 |
<P> |
| 37 |
See the <A HREF="http://www.sco.com/Technology/tcl/man/tk_man/options.n.html"> "options" </A> manual entry for details on the standard options. |
| 38 |
</pre><H2>ASSOCIATED OPTIONS</H2> |
| 39 |
<P> |
| 40 |
<table cellpadding=5> |
| 41 |
<td valign=top> |
| 42 |
<B>lhsButtonLabel</B><br> |
| 43 |
</td> |
| 44 |
<td valign=top> |
| 45 |
<B>rhsButtonLabel</B><br> |
| 46 |
</td> |
| 47 |
<td valign=top> |
| 48 |
</td> |
| 49 |
<td valign=top> |
| 50 |
</td> |
| 51 |
</table> |
| 52 |
<P> |
| 53 |
See the <A HREF="http://www.sco.com/Technology/tcl/man/tk_man/button.n.html"> "button" </A> widget manual entry for details on the above |
| 54 |
associated options. |
| 55 |
<P> |
| 56 |
<table cellpadding=5> |
| 57 |
<td valign=top> |
| 58 |
<B>labelFont</B><br> |
| 59 |
</td> |
| 60 |
<td valign=top> |
| 61 |
<B>lhsLabelText</B><br> |
| 62 |
</td> |
| 63 |
<td valign=top> |
| 64 |
<B>rhsLabelText</B><br> |
| 65 |
</td> |
| 66 |
<td valign=top> |
| 67 |
</td> |
| 68 |
</table> |
| 69 |
<P> |
| 70 |
See the "label" widget manual entry for details on the above |
| 71 |
associated options. |
| 72 |
<P> |
| 73 |
<table cellpadding=5> |
| 74 |
<td valign=top> |
| 75 |
<B>jump</B><br> |
| 76 |
</td> |
| 77 |
<td valign=top> |
| 78 |
<B>troughColor</B><br> |
| 79 |
</td> |
| 80 |
<td valign=top> |
| 81 |
</td> |
| 82 |
<td valign=top> |
| 83 |
</td> |
| 84 |
</table> |
| 85 |
<P> |
| 86 |
See the <A HREF="http://www.sco.com/Technology/tcl/man/tk_man/scrollbar.n.html"> "scrollbar" </A> widget class manual entry for details on the above |
| 87 |
associated options. |
| 88 |
<P> |
| 89 |
<table cellpadding=5> |
| 90 |
<td valign=top> |
| 91 |
<B>textBackground</B><br> |
| 92 |
</td> |
| 93 |
<td valign=top> |
| 94 |
<B>textFont</B><br> |
| 95 |
</td> |
| 96 |
<td valign=top> |
| 97 |
<B>lhsItems</B><br> |
| 98 |
</td> |
| 99 |
<td valign=top> |
| 100 |
<B>rhsItems</B><br> |
| 101 |
</td> |
| 102 |
</table> |
| 103 |
<P> |
| 104 |
See the <A HREF="scrolledlistbox.n.html"> "scrolledlistbox" </A> widget manual entry for details on the above |
| 105 |
associated options. |
| 106 |
</pre><H2>WIDGET-SPECIFIC OPTIONS</H2> |
| 107 |
<P> |
| 108 |
<pre> |
| 109 |
Name: <B>buttonPlacement</B> |
| 110 |
Class: <B>ButtonPlacement</B> |
| 111 |
Command-Line Switch: <B>-buttonplacement</B> |
| 112 |
</pre> |
| 113 |
<UL> |
| 114 |
Specifies the placement of the insertion and removal buttons relative to the |
| 115 |
scrolledlistbox widgets<B>n</B>, |
| 116 |
<B>bottom</B>, or <B>center</B>. The default is bottom. |
| 117 |
</UL> |
| 118 |
<P> |
| 119 |
<pre> |
| 120 |
Name: <B>lhsLabelText</B> |
| 121 |
Class: <B>LabelText</B> |
| 122 |
Command-Line Switch: <B>-lhslabeltext</B> |
| 123 |
</pre> |
| 124 |
<UL> |
| 125 |
Specifies the text for the label of the lhs scrolledlistbox. |
| 126 |
The default is "Available". |
| 127 |
</UL> |
| 128 |
<P> |
| 129 |
<pre> |
| 130 |
Name: <B>rhsLabelText</B> |
| 131 |
Class: <B>LabelText</B> |
| 132 |
Command-Line Switch: <B>-rhslabeltext</B> |
| 133 |
</pre> |
| 134 |
<UL> |
| 135 |
Specifies the text for the label of the rhs scrolledlistbox. |
| 136 |
The default is "Available". |
| 137 |
</UL> |
| 138 |
<P> |
| 139 |
<pre> |
| 140 |
Name: <B>lhsButtonLabel</B> |
| 141 |
Class: <B>LabelText</B> |
| 142 |
Command-Line Switch: <B>-lhsbuttonlabel</B> |
| 143 |
</pre> |
| 144 |
<UL> |
| 145 |
Specifies the text for the button of the lhs scrolledlistbox. |
| 146 |
The default is "Insert >>". |
| 147 |
</UL> |
| 148 |
<P> |
| 149 |
<pre> |
| 150 |
Name: <B>rhsButtonLabel</B> |
| 151 |
Class: <B>LabelText</B> |
| 152 |
Command-Line Switch: <B>-rhsbuttonlabel</B> |
| 153 |
</pre> |
| 154 |
<UL> |
| 155 |
Specifies the text for the button of the rhs scrolledlistbox. |
| 156 |
The default is "<< Remove". |
| 157 |
</UL> |
| 158 |
<P> |
| 159 |
<pre> |
| 160 |
Name: <B>lhsSortOption</B> |
| 161 |
Class: <B>LhsSortOption</B> |
| 162 |
Command-Line Switch: <B>-lhssortoption</B> |
| 163 |
</pre> |
| 164 |
<UL> |
| 165 |
Specifies the sort function to be applied to the lhs scrolledlistbox |
| 166 |
after items are inserted. Accepts the same sort options as the scrolledlistbox |
| 167 |
sort method (Tcl's lsort command). If "none" is specified, the inserted |
| 168 |
items are appended to the end of the list, and no sorting is performed. |
| 169 |
The default is "increasing". |
| 170 |
</UL> |
| 171 |
<P> |
| 172 |
<pre> |
| 173 |
Name: <B>rhsSortOption</B> |
| 174 |
Class: <B>RhsSortOption</B> |
| 175 |
Command-Line Switch: <B>-rhssortoption</B> |
| 176 |
</pre> |
| 177 |
<UL> |
| 178 |
Specifies the sort function to be applied to the rhs scrolledlistbox |
| 179 |
after items are inserted. Accepts the same sort options as the scrolledlistbox |
| 180 |
sort method (Tcl's lsort command). If "none" is specified, the inserted |
| 181 |
items are appended to the end of the list, and no sorting is performed. |
| 182 |
The default is "increasing". |
| 183 |
</UL> |
| 184 |
<P> |
| 185 |
</pre><HR> |
| 186 |
</pre><H2>DESCRIPTION</H2> |
| 187 |
<P> |
| 188 |
The <B>iwidgets::disjointlistbox</B> command creates a disjoint pair of listboxs |
| 189 |
similar to the OSF/Motif "Book" printing dialog of the "FrameMaker" |
| 190 |
program. It is implementation constists of a two Scrolledlistboxs, |
| 191 |
2 buttons, and 2 labels. |
| 192 |
|
| 193 |
The disjoint behavior of this widget exists between the interaction of |
| 194 |
the two Scrolledlistboxes with one another. That is, a given instance |
| 195 |
of a Disjointlistbox will never exist, without the aid of a hack magician, |
| 196 |
which has Scrolledlistbox widgets with items in common. That means the |
| 197 |
relationship between the two is maintained similar to that of disjoint sets. |
| 198 |
|
| 199 |
Users may transfer items between the two Listbox widgets using the |
| 200 |
the two buttons. |
| 201 |
|
| 202 |
Options exists which include the ability to configure the "items" displayed by |
| 203 |
the 2 Scrolledlistboxes and to control the placement of the insertion and |
| 204 |
removal buttons. |
| 205 |
</pre><H2>METHODS</H2> |
| 206 |
<P> |
| 207 |
The <B>iwidgets::disjointlistbox</B> command creates a new Tcl command whose |
| 208 |
name is <I>pathName</I>. This command may be used to invoke various |
| 209 |
operations on the widget. It has the following general form: |
| 210 |
<pre> |
| 211 |
<I>pathName option </I>?<I>arg arg ...</I>? |
| 212 |
</pre> |
| 213 |
<I>Option</I> and the <I>arg</I>s |
| 214 |
determine the exact behavior of the command. The following |
| 215 |
commands are possible for disjointlistbox widgets: |
| 216 |
|
| 217 |
</pre><H2>WIDGET-SPECIFIC METHODS</H2> |
| 218 |
<DL> |
| 219 |
<DT> <I>pathName <B>cget</B> <I>option</I> |
| 220 |
</I></B> |
| 221 |
<DD> Returns the current value of the configuration option given |
| 222 |
by <I>option</I>. |
| 223 |
<I>Option</I> may have any of the values accepted by the <B>iwidgets::disjointlistbox</B> |
| 224 |
command. |
| 225 |
</DL> |
| 226 |
<DL> |
| 227 |
<DT> <I>pathName</I> <B>configure</B> ?<I>option</I>? ?<I>value option value ...</I>? |
| 228 |
</I></B> |
| 229 |
<DD> Query or modify the configuration options of the widget. |
| 230 |
If no <I>option</I> is specified, returns a list describing all of |
| 231 |
the available options for <I>pathName</I> (see <B>Tk_ConfigureInfo</B> for |
| 232 |
information on the format of this list). If <I>option</I> is specified |
| 233 |
with no <I>value</I>, then the command returns a list describing the |
| 234 |
one named option (this list will be identical to the corresponding |
| 235 |
sublist of the value returned if no <I>option</I> is specified). If |
| 236 |
one or more <I>option-value</I> pairs are specified, then the command |
| 237 |
modifies the given widget option(s) to have the given value(s); in |
| 238 |
this case the command returns an empty string. |
| 239 |
<I>Option</I> may have any of the values accepted by the <B>iwidgets::disjointlistbox</B> |
| 240 |
command. |
| 241 |
</DL> |
| 242 |
<DL> |
| 243 |
<DT> <I>pathName <B>setlhs</B> |
| 244 |
</I></B> |
| 245 |
<DD> Set the current contents of the left-most Scrolledlistbox with the input list |
| 246 |
of items. Removes all (if any) items from the right-most Scrolledlistbox |
| 247 |
which exist in the input list option to maintain the disjoint property |
| 248 |
between the two |
| 249 |
</DL> |
| 250 |
<DL> |
| 251 |
<DT> <I>pathName <B>setrhs</B> |
| 252 |
</I></B> |
| 253 |
<DD> Set the current contents of the right-most Scrolledlistbox with the input list |
| 254 |
of items. Removes all (if any) items from the left-most Scrolledlistbox |
| 255 |
which exist in the input list option to maintain the disjoint property |
| 256 |
between the two |
| 257 |
</DL> |
| 258 |
<DL> |
| 259 |
<DT> <I>pathName <B>getlhs</B> |
| 260 |
</I></B> |
| 261 |
<DD> Returns the current contents of the left-most Scrolledlistbox |
| 262 |
</DL> |
| 263 |
<DL> |
| 264 |
<DT> <I>pathName <B>getrhs</B> |
| 265 |
</I></B> |
| 266 |
<DD> Returns the current contents of the right-most Scrolledlistbox |
| 267 |
</DL> |
| 268 |
<DL> |
| 269 |
<DT> <I>pathName <B>insertlhs</B> |
| 270 |
</I></B> |
| 271 |
<DD> Add the input list of items to the current contents of the left-most |
| 272 |
Scrolledlistbox. Removes all (if any) items from the right-most Scrolledlistbox |
| 273 |
which exist in the input list option to maintain the disjoint property |
| 274 |
between the two |
| 275 |
</DL> |
| 276 |
<DL> |
| 277 |
<DT> <I>pathName <B>insertrhs</B> |
| 278 |
</I></B> |
| 279 |
<DD> Add the input list of items to the current contents of the right-most |
| 280 |
Scrolledlistbox. Removes all (if any) items from the left-most Scrolledlistbox |
| 281 |
which exist in the input list option to maintain the disjoint property |
| 282 |
between the two. |
| 283 |
</DL> |
| 284 |
<DL> |
| 285 |
</DL> |
| 286 |
</pre><H2>COMPONENTS</H2> |
| 287 |
<P> |
| 288 |
<pre> |
| 289 |
Name: <B>lhs</B> |
| 290 |
Class: <B>Scrolledlistbox</B> |
| 291 |
</pre> |
| 292 |
<UL> |
| 293 |
The lhs component is the scrolledlistbox for the rhs button. |
| 294 |
See the <A HREF="scrolledlistbox.n.html"> "scrolledlistbox" </A> widget manual entry for details on the lhs |
| 295 |
component item. |
| 296 |
</UL> |
| 297 |
<P> |
| 298 |
<pre> |
| 299 |
Name: <B>rhs</B> |
| 300 |
Class: <B>Scrolledlistbox</B> |
| 301 |
</pre> |
| 302 |
<UL> |
| 303 |
The rhs component is the scrolledlistbox for the rhs button. |
| 304 |
See the <A HREF="scrolledlistbox.n.html"> "scrolledlistbox" </A> widget manual entry for details on the rhs |
| 305 |
component item. |
| 306 |
</UL> |
| 307 |
<P> |
| 308 |
<pre> |
| 309 |
Name: <B>lhsbutton</B> |
| 310 |
Class: <B>utton</B> |
| 311 |
</pre> |
| 312 |
<UL> |
| 313 |
The lhsbutton component is the button for users to remove selected items |
| 314 |
from the lhs Scrolledlistbox. |
| 315 |
See the <A HREF="http://www.sco.com/Technology/tcl/man/tk_man/button.n.html"> "button" </A> widget manual entry for details on the lhs button component. |
| 316 |
</UL> |
| 317 |
<P> |
| 318 |
<pre> |
| 319 |
Name: <B>rhsbutton</B> |
| 320 |
Class: <B>Button</B> |
| 321 |
</pre> |
| 322 |
<UL> |
| 323 |
The rhsbutton component is the button for users to remove selected items |
| 324 |
from the rhs Scrolledlistbox. |
| 325 |
See the <A HREF="http://www.sco.com/Technology/tcl/man/tk_man/button.n.html"> "button" </A> widget manual entry for details on the rhs button component. |
| 326 |
</UL> |
| 327 |
<P> |
| 328 |
<pre> |
| 329 |
Name: <B>lhsCount</B> |
| 330 |
Class: <B>Label</B> |
| 331 |
</pre> |
| 332 |
<UL> |
| 333 |
The lhsCount component is the label for displaying a count of the current items in |
| 334 |
the Scrolledlistbox. |
| 335 |
See the "Label" widget manual entry for details on the lhsCount label component. |
| 336 |
</UL> |
| 337 |
<P> |
| 338 |
<pre> |
| 339 |
Name: <B>rhsCount</B> |
| 340 |
Class: <B>Label</B> |
| 341 |
</pre> |
| 342 |
<UL> |
| 343 |
The rhsCount component is the label for displaying a count of the current items in |
| 344 |
the Scrolledlistbox. |
| 345 |
See the "Label" widget manual entry for details on the rhsCount label component. |
| 346 |
</UL> |
| 347 |
</table> |
| 348 |
<UL> |
| 349 |
</UL> |
| 350 |
</pre><H2>EXAMPLE</H2> |
| 351 |
<pre> |
| 352 |
package require Iwidgets 4.0 |
| 353 |
iwidgets::disjointlistbox .dlb |
| 354 |
pack .dlb -padx 10 -pady 10 -fill both -expand yes |
| 355 |
</pre> |
| 356 |
</pre><H2>AUTHOR(S)</H2> |
| 357 |
John A. Tucker |
| 358 |
</pre> |
| 359 |
Anthony Parent |
| 360 |
</pre><H2>KEYWORDS</H2> |
| 361 |
disjointlistbox, widget |