From Newsgroup: comp.lang.tcl
I am pleased to announce version 1.5 of the toggle switch widget package
Tsw.
What is new in Tsw 1.5?
-----------------------
1. Added support for the standard options "-font", "-foreground",
"-text", "-textvariable", "-underline", and "-width" (thanks to
Valer100 for his proposal).
2. The toggleswitch widget now also contains a ttk::label displaying an
optional text to the scale child's left; this label is only managed
if the text specified with the "-text" or "-textvariable" option is
a nonempty string.
3. The ttk:frame containing a ttk::scale and a ttk::label as children
now has its own layout named "ToggleswitchHull"; the styling options
"-focuscolor", "-focussolid", and "-focusthickness" now refer to this
style rather than to "Toggleswitch1", "Toggleswitch2", and
"Toggleswitch3" (which continue to support the "-padding" option).
4. Modified the demo script "EditingOpts.tcl" to specify the texts of
the "Editing Options" window as the values of the "-text" option of
the toggleswitch widgets.
How to get it?
--------------
Tsw is available for free download from the Web page
https://www.nemethi.de
The distribution file is "tsw1.5.tar.gz" for UNIX and "tsw1_5.zip" for
Windows. These files contain the same information, except for the
additional carriage return character preceding the linefeed at the end
of each line in the text files for Windows.
Tsw is also included in tklib, which has the address
https://core.tcl-lang.org/tklib
How to install it?
------------------
Install the package as a subdirectory of one of the directories given
by the "auto_path" variable. For example, you can install it as a
subdirectory of the "lib" directory within your Tcl/Tk installation (at
the same level as the tk8.X or tk9.X subdirectory).
To install Tsw on UNIX, "cd" to the desired directory and unpack the distribution file "tsw1.5.tar.gz":
gunzip -c tsw1.5.tar.gz | tar -xf -
On most UNIX systems this can be replaced with
tar -zxf tsw1.5.tar.gz
Both commands will create a directory named "tsw1.5", with the
subdirectories "demos", "doc", and "scripts".
On Windows, use WinZip or some other program capable of unpacking the distribution file "tsw1_5.zip" into the directory "tsw1.5", with the subdirectories "demos", "doc", and "scripts".
How to use it?
--------------
To be able to access the commands and variables of the Tsw package, your scripts must contain one of the lines
package require tsw ?version?
package require Tsw ?version?
Since the Tsw package is implemented in its own namespace called "tsw",
you must either invoke the
namespace import tsw::toggleswitch
command to import the only public procedure of the tsw namespace, or use
the qualified name tsw::toggleswitch. To access Tsw variables, you must
use qualified names.
For a detailed description of the commands and variables provided by Tsw
and of the examples contained in the "demos" directory, see the tutorial "tsw.html" and the reference page "toggleswitch.html", both located in
the "doc" directory.
--
Csaba Nemethi
https://www.nemethi.de mailto:
csaba.nemethi@t-online.de
--- Synchronet 3.22a-Linux NewsLink 1.2