[ tktoolkit-Bugs-1288433 ] LisboxSelect event triggers when listbox state is disabled

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ tktoolkit-Bugs-1288433 ] LisboxSelect event triggers when listbox state is disabled

SourceForge.net
Bugs item #1288433, was opened at 2005-09-12 10:22
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112997&aid=1288433&group_id=12997

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: 09. [listbox]
Group: current: 8.4.11
Status: Open
Resolution: None
Priority: 5
Submitted By: Torsten Reincke (treincke)
Assigned to: Allen Flick (caflick)
Summary: LisboxSelect event triggers when listbox state is disabled

Initial Comment:
This code

   pack [listbox .l]
   .l insert end 1 2 3
   bind .l <<ListboxSelect>> {puts click!}
   .l configure -state disabled

shows that the ListBoxSelect event will be triggered regardless of the state
of the listbox. Although the listbox is "disabled" so no selection can be
made, the event fires, indicating a selection has been made.

Jeff Hobbs writes on this subject:

(http://groups.google.com/group/comp.lang.tcl/browse_thread/thread/
b63e43a981b6a698/93341e895ba0c054)

"Hmm, I would cal that a low priority bug.  It appears that the
ListboxSelect is merely triggering unnecessarily.  The items
are not actually being selected, so functionally it is all OK,
but we could avoid the ListboxSelect, so we should."

A workaround on script level is to check for the listbox state in the code for
the binding:

bind .l <<ListboxSelect>> {
   # abort, if disabled:
   if {[%W cget -state]=="disabled"} {break}
   # else do the normal action:
   # ...
}

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112997&aid=1288433&group_id=12997


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Tcl-Bugs mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tcl-bugs