질문이 있습니다.
checkbutton에서 어떤 하나의 버튼을 check 해야만 그 하위 checkbutton을 활성화 시키려면
어떻게 해야합니까?
아래의 code에서는,, .opt_io.opt_ck 가 선택되야만 opt_1, opt_2, opt_3, opt_4를 선택 할수
있게 setting 하려고 합니다.
#!/usr/bin/wish
proc OPTION {} {
frame .opt_io
label .opt_io.opt_io_la -text "Option : "
checkbutton .opt_io.opt_ck -variable opt_ck
checkbutton .opt_io.opt_1 -text test1 -variable opt_1
checkbutton .opt_io.opt_2 -text test2 -variable opt_2
checkbutton .opt_io.opt_3 -text test3 -variable opt_3
checkbutton .opt_io.opt_4 -text test4 -variable opt_4
pack .opt_io.opt_ck .opt_io.opt_io_la .opt_io.opt_1 .opt_io.opt_2 .opt_io.opt_3 .opt_io.opt_4 -side left
pack .opt_io -side top -fill x -expand true
}
OPTION
proc OPTION {} {
frame .opt_io
label .opt_io.opt_io_la -text "Option : "
checkbutton .opt_io.opt_ck -variable opt_ck
checkbutton .opt_io.opt_1 -text test1 -variable opt_1
checkbutton .opt_io.opt_2 -text test2 -variable opt_2
checkbutton .opt_io.opt_3 -text test3 -variable opt_3
checkbutton .opt_io.opt_4 -text test4 -variable opt_4
pack .opt_io.opt_ck .opt_io.opt_io_la .opt_io.opt_1 .opt_io.opt_2 .opt_io.opt_3 .opt_io.opt_4 -side left
pack .opt_io -side top -fill x -expand true
}
OPTION
Home
Wiki
Archive Center
Bug Tracker
E-Mail