#!/bin/sh
# btnn_frm2.tcl \
exec tclsh "$0" ${1+"$@"}
proc toggle_frame { } {
global frame_status
if { $frame_status =="shown" } {
pack forget .f
set frame_status "hidden"
return 1
}
if { $frame_status =="hidden"} {
pack .f
pack .l -in .f
pack .l2 -in .f
set frame_status "show"
return 1
}
}
set frame_status "shown"
button .btoggel -text "show/hide frame " -command "toggle_frame"
frame .f -borderwidth 5
label .l -text "lab1"
label .l2 -text "lab2"
pack .btoggel .f
pack .l -in .f
pack .l2 -in .f
# btnn_frm2.tcl \
exec tclsh "$0" ${1+"$@"}
proc toggle_frame { } {
global frame_status
if { $frame_status =="shown" } {
pack forget .f
set frame_status "hidden"
return 1
}
if { $frame_status =="hidden"} {
pack .f
pack .l -in .f
pack .l2 -in .f
set frame_status "show"
return 1
}
}
set frame_status "shown"
button .btoggel -text "show/hide frame " -command "toggle_frame"
frame .f -borderwidth 5
label .l -text "lab1"
label .l2 -text "lab2"
pack .btoggel .f
pack .l -in .f
pack .l2 -in .f