Posted to tcl by de at Thu Apr 21 18:45:51 GMT 2022view raw

  1.  
  2. # On linux the <Double-1> event will be delivered to the app (despite
  3. # the <<ListboxSelect>> needs some time to return.) On windows (at
  4. # least on my windows 10 box) no <Double-1> will be delivered to the
  5. # app.
  6.  
  7. set data {one two tree}
  8.  
  9. proc listboxselect {args} {
  10. puts "listboxselect called"
  11. after 1500
  12. }
  13.  
  14. proc double {args} {
  15. puts "double called"
  16. }
  17.  
  18. listbox .l -listvariable data
  19. bind .l <<ListboxSelect>> listboxselect
  20. bind .l <Double-1> double
  21. pack .l
  22.  
  23.