RJ,

Binding to a listbox is a little tricky.  The problem is that the binding
event fires *before* the listbox changes selection.  So when you query the
listbox, you get the previous selection.

The standard way to bind to a listbox is in the Tk Usage FAQ, number 8.5 at
http://www.purl.org/net/hobbs/tcl/faqs/tk/

But I believe that Jeff Hobbs recently mentioned on comp.lang.tcl that there
is a *new* and *undocumented* listbox virtual event which fires when a new
selection is made.  Try binding your code to <<ListboxSelect>>, as described
in http://www.deja.com/getdoc.xp?AN=526544553

Bob Techentin                                  [EMAIL PROTECTED]
Mayo Foundation                                           (507) 284-2702
Rochester MN, 55905 USA   http://www.mayo.edu/sppdg/sppdg_home_page.html




> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of
> [EMAIL PROTECTED]
> Sent: Saturday, October 09, 1999 5:13 PM
> To: [EMAIL PROTECTED]
> Subject: [vtcl] Listbox selections and cascade updates?
>
>
> Greetings,
>
> I have a list box that I have a mouse click event binding on that
> lags behind,
> giving the previous selected itme from the list box to the cascad
> information to
> another list box.  Hence you have to double click to get it to function
> correct.  Below is a snippet of code I am using:
>
[snip]

---------------------------------------------------------------------------
To unsubscribe from the Visual Tcl mailing list, please send a message
to [EMAIL PROTECTED] with "unsubscribe vtcl [EMAIL PROTECTED]" in the
message body (where [EMAIL PROTECTED] is your e-mail address).

Reply via email to