Bob Techentin wrote:
> 
> 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]
> >
> > 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).
Hi,

you can get the selection when you use the event "ButtonRelease-1".

Michael

-- 
-----------------------------------------------------------
Ing. Hans-Michael Haschek, Case Software Technologies
Tel. ++43 (0) 61 32 / 28 0 33 -34
Fax  ++43 (0) 61 32 / 28 0 33 -4
www : http://www.t-ide.com
Lets have Tcl/Tk at your fingertips with TIDE
---------------------------------------------------------------------------
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