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

Double click with a listbox

32 views
Skip to first unread message

Cecil Westerhof

unread,
Jun 27, 2018, 6:44:05 PM6/27/18
to
I had:
bind .f.brew <<ListboxSelect>> [list makeTea %W]

That worked fine, but I prefer not to fire on selection of an entry,
but when an entry is double-clicked. So I tried (beside some other
things):
bind .f.brew <<Double-1>> [list makeTea %W]

But that does not work. How would I get that working?

--
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Eugene

unread,
Jun 27, 2018, 7:06:19 PM6/27/18
to
On 27-Jun-18 6:42 PM, Cecil Westerhof wrote:
> I had:
> bind .f.brew <<ListboxSelect>> [list makeTea %W]
>
> That worked fine, but I prefer not to fire on selection of an entry,
> but when an entry is double-clicked. So I tried (beside some other
> things):
> bind .f.brew <<Double-1>> [list makeTea %W]
>
> But that does not work. How would I get that working?
>

Try bind .f.brew <Double-1> {makeTea %W}

--
Best regards,
Eugene

Cecil Westerhof

unread,
Jun 27, 2018, 7:14:04 PM6/27/18
to
Cecil Westerhof <Ce...@decebal.nl> writes:

> I had:
> bind .f.brew <<ListboxSelect>> [list makeTea %W]
>
> That worked fine, but I prefer not to fire on selection of an entry,
> but when an entry is double-clicked. So I tried (beside some other
> things):
> bind .f.brew <<Double-1>> [list makeTea %W]
>
> But that does not work. How would I get that working?

It needs to be:
bind .f.brew <Double-1> [list makeTea %W]

Mike Griffiths

unread,
Jun 28, 2018, 5:04:12 PM6/28/18
to
One set of <Angle Brackets> is used for "real" bindings - ones that refer to actual mouse or keyboard actions.

When <<Two Sets>> are used, it's for a "virtual" event binding, where you have a binding with a custom name and can then assign any number of "real" bindings to trigger it with the [event] command. (For instance, the [text] widget binds to the virtual <<Copy>> and <<Paste>> events, and these are triggered by <Control-c> & <Insert>, and <Control-v> & <Shift-Insert>, respectively.)
0 new messages