Help me please to decide problem with listbox in TCL. I created the next listbox:
listbox .lb1 -height 6 -width 10 -selectmode browse
.lb1 insert 0 "String 1" "String 2" "String 3" "String 4" "String 5" "String 6"
label .label1 -text [.lb1 get active]
button .butt1 -text "enter" -command {.label1 configure -text [.lb1 get active]}
pack .label1 .lb1 .butt1 -expand yes -fill both
How I can change automatically contents of label "label1" without use button "butt1" ?
I want the contents of "label1" will change immediately when I click on one of the list items.
Thanks!