0
我有問題,當我調整我的窗口,我不明白爲什麼,當我移動我的窗口.
我的另一個窗口創建與.c bind cir <1> [list window %x %y]
不要跟着我的窗口.
我相信,已經使用<Configure>
作爲選項,但我不知道如何爲您的幫助下TCL TK調整窗口:綁定
我的代碼做
感謝:
proc window {crx cry} {
set w1 .win
catch {destroy $w1}
toplevel $w1
wm minsize $w1 300 100
wm maxsize $w1 300 100
label $w1.l -text "$crx $cry"
pack $w1.l
}
wm state . zoomed
canvas .c -bg ivory
.c create oval 2 1.5 25 25 -fill #33FF00 -tag cir
.c create oval 30 30 50 50 -fill #33FF00 -tag cir1
.c create oval 60 60 90 90 -fill #33FF00 -tag cir2
.c create oval 90 90 130 130 -fill #33FF00 -tag cir3
pack .c -fill both -expand 1
.c bind cir <1> [list window %x %y]
.c bind cir1 <1> [list window %x %y]
.c bind cir2 <1> [list window %x %y]
.c bind cir3 <1> [list window %x %y]
謝謝@DonalFellows迴應 – Mkn