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

tablelist exportselection over multiple windows

39 views
Skip to first unread message

Juge

unread,
Jan 19, 2018, 3:38:25 AM1/19/18
to
I am using tablelist in my GUI. In the mainwindow I have two tables where I do not want to have simultaneous selection, if I select something in table 1 I want to have table 2 selection cleared. So with -exportselection it worked ... for awhile.
No I have another topevel window also with tables and I want to have the same functionality - within that window - however, now switching the selections deselects everything on the other toplevel window as well.

Is there some option to limit this only to the active window.
I can, of course, put a bind on the table and clear selection from the other but I am looking for something more elegant.

nemethi

unread,
Jan 19, 2018, 4:33:31 AM1/19/18
to
This is the standard behavior, common to all widgets that support the
-exportselection option. The Tablelist package just respects the
standard and doesn't provide any option for limiting the export of the
selection to the currently active toplevel window.

--
Csaba Nemethi http://www.nemethi.de mailto:csaba....@t-online.de

Juge

unread,
Jan 19, 2018, 10:22:09 AM1/19/18
to
Ok, so I need to write the bind <<TablelistSelect>> and put selection clear for the other table in it. I thought there might be some way to limit the the exportselection stuff to work within one toplevel window.

Andreas Leitgeb

unread,
Jan 27, 2018, 1:21:05 PM1/27/18
to
Juge <jyrki.m...@gmail.com> wrote:
> Ok, so I need to write the bind <<TablelistSelect>> and put selection clear for the other table in it. I thought there might be some way to limit the the exportselection stuff to work within one toplevel window.

Well, you already know the solution. Here's some reasoning about why
it's affecting the other instance of the application:

exportselection essentially means that whenever you select something, it
will make it the selection (as in "clipboard") of your current desktop,
and it will notice when some other application (e.g. the second instance
of your program, or just an editor) claims the selection for itself, and
reflect loss of selection by unselecting in the widget.

As a rule of thumb, one should use -exportselection only, if one wants
the selected items or characters to be paste-able across applications.

0 new messages