Friday, 24 February 2017

Hide and Show button (managing push button)

This program is implemented in eclipse

#!/bin/sh
# bttn_frm.tcl \
exec tclsh "$0" ${1+"$@"}
proc hide  {} {
pack forget .f
}

proc show {} {

pack .f
pack .l -in .f
pack .l2 -in .f
}
button .bh -text "hide" -command "hide"
button .bs -text "show" -command "show"
frame .f -borderwidth 5 -background red
label .l -text "lab1"
label .l2 -text "lab2"
pack .bh .bs .f
pack .l -in .f
pack .l2 -in .f

No comments:

Post a Comment