tinycobol/test.code/00_FernandoWuthstrack/tcl/ex2.tcl

21 lines
492 B
Tcl

package require Tk
set ok 0
frame .f
listbox .lst -height 4 -listvariable list_inputs -yscrollcommand {.sv set}
scrollbar .sv -width 10 -command {.lst yview}
pack .lst -in .f -side left -fill both -expand 1
pack .sv -in .f -side left -fill y
label .lb -text "Text data:"
entry .e -textvariable entry_data
button .b -text ok -command {set ok 1}
focus .e
bind .e <Return> {.b invoke}
grid .lb .e - -pady 10 -padx 10
grid .f - - -pady 10 -padx 10 -sticky nsew
grid .b - - -pady 10 -padx 10