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

newbie Q: receiving <<ListboxSelect>> altho disabled

8 views
Skip to first unread message

Kenny Tilton

unread,
Jun 30, 2004, 12:47:47 PM6/30/04
to
Just getting started on Tk (via wish, from Common Lisp). Aside: Tk looks
like a great solution for portable GUIs. Anyway, I have a Listbox widget
working quite nicely, including becoming disabled when semantics make it
irrelevant. The listbox elements are all dimmed and clicking on them
does not select them, but...

I do get <<ListboxSelect>> events for the binding I established for
that. It will be easy to either dynamically drop/re-establish the
binding, or as an alternative simply note on my side that the widget is
disabled -- well, I do not even have to do that since no matter where I
click it correctly returns the selection info as it stood when last enabled.

I am just wondering as a newbie if I am missing something, since I would
not expect select events from a disabled control.

kenny

--
Home? http://tilton-technology.com
Cells? http://www.common-lisp.net/project/cells/
Cello? http://www.common-lisp.net/project/cello/
Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film
Your Project Here! http://alu.cliki.net/Industry%20Application

Kenny Tilton

unread,
Jun 30, 2004, 1:37:32 PM6/30/04
to
I should have mentioned I am running WinXP, wish84.exe from ActiveState.
Win properties show version 8.4.2.6 in one place, 8.4.6 in another. :(

kt

Jeff Hobbs

unread,
Jul 13, 2004, 11:57:31 AM7/13/04
to Kenny Tilton
Kenny Tilton wrote:

> I should have mentioned I am running WinXP, wish84.exe from ActiveState.
> Win properties show version 8.4.2.6 in one place, 8.4.6 in another. :(

Those numbers are both correct, and equal to each other, in the magic
of how Tcl adapts to the Windows numbering scheme.

> Kenny Tilton wrote:
>
>> Just getting started on Tk (via wish, from Common Lisp). Aside: Tk
>> looks like a great solution for portable GUIs. Anyway, I have a
>> Listbox widget working quite nicely, including becoming disabled when
>> semantics make it irrelevant. The listbox elements are all dimmed and
>> clicking on them does not select them, but...
>>
>> I do get <<ListboxSelect>> events for the binding I established for
>> that. It will be easy to either dynamically drop/re-establish the
>> binding, or as an alternative simply note on my side that the widget
>> is disabled -- well, I do not even have to do that since no matter
>> where I click it correctly returns the selection info as it stood when
>> last enabled.
>>
>> I am just wondering as a newbie if I am missing something, since I
>> would not expect select events from a disabled control.

I see the same effect ... you could register this as a bug, as I
wouldn't expect it either. However, it's not a big problem because
the listbox is correctly disabled and you get the same selection
each trigger. You probably want to cache the last curselection and
act only on changes from the last known, which will be a good
work-around and likely better behavior.

--
Jeff Hobbs, The Tcl Guy
http://www.ActiveState.com/, a division of Sophos

0 new messages