Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Ann: Module persistentSelection

87 views
Skip to first unread message

Keith Nash

unread,
Feb 19, 2018, 2:43:27 PM2/19/18
to
Consider a Tk widget that sets its -exportselection option to boolean true,
thereby exporting its selection. When the selection in the widget is
canceled, by default Tk also cancels the PRIMARY selection. In this
situation, an attempt to read the PRIMARY selection, e.g. by the handler for
a <<PasteSelection>> event, will fail.

The persistentSelection package offers more convenient behavior. It will
sustain as the PRIMARY selection the last non-empty value set by any Tk
widget that it monitors, as long as the PRIMARY selection is not claimed by
another process, or by a Tk widget that it does not monitor.

The persistentSelection package works by binding to the <<Selection>> event
on the widgets of interest, and using this binding to monitor any change of
the selection in the widget.

The entry, spinbox, ttk::entry, ttk::spinbox, and ttk::combobox widgets do
not generate <<Selection>> events. To use persistentSelection with these
widgets, use the Snit wrappers of module widgetPlus in their place.

To use persistentSelection with a text widget, either use the Ntext binding
tag of module ntext 1.0, or run the command persistentSelection::fixText to
apply corrections to the Text bindings (this step will be unnecessary in Tk
8.6.9 and above).

Examples and documentation are included.

persistentSelection is a module of tklib.

Version 1.0b1 was committed to tklib at 2018-02-17 18:10 UTC [c77a6c2319].
It is not yet available in the packaged version of tklib.

Keith Nash.

rhobart/popple

unread,
Nov 14, 2018, 2:11:57 PM11/14/18
to
Is tklib used much? I was wanting to install it but it seems like it has not been updated in a while, as in this package too. I am actually wanting to install latest version of Tablelist but the newest one is not installed there either. Would it be the proper to install tablelist into tklib anyway? I'm still a new tcler.

rhobart/popple

unread,
Nov 14, 2018, 2:16:20 PM11/14/18
to
I believe is see what is going on now. tablelist is there 2018-09 but the tklib (0.6) says last released was 2013.03.25. I was thinking that the tklib release date was the last added package.

Keith Nash

unread,
Nov 22, 2018, 10:10:58 AM11/22/18
to
Official releases of Tklib are infrequent. It's best to download and build
the code from fossil.

Keith.
0 new messages