求助!!!有关tk里listbox取值问题

发布: 2017-6-26 10:46 | 作者: baojiewu | 来源: EETOP 赛灵思(Xilinx) 社区

下面程式中listbox的取值有什么问题

proc select {} {global filelist
destroy .sel
toplevel .sel
wm title .sel "Selection"
set filelist {A BC D E F}
set f0 [frame .sel.f0 -relief raised]
   listbox $f0.liistbox -width 20 -height 13 -font {courier 12} -bg white -listvariable filelist -selectmode single
   grid $f0.liistbox -sticky news
grid $f0 -row0


set result [$f0.liatbox curselection]


set aoc [frame .sel.aoc -relief raised]
   botton $aoc.butSave -text "OK" -width 7 -highlightthickness 0 -aommand "puts $result;destroy .sel"
   pack $aoc.butSave -side right
grid $aoc -row1
}

网络资源