Hi too,
I can answer your question in two parts, but I think, you cannot use buttons
to do that.
1) You don't use vTcl to build your app:
=============================BEGIN OF TCL SCRIPT 1=========================
#!/usr/bin/wish4.2
global stat
set stat 0
trace variable stat w switch_frame
proc switch_frame {varname index op} {
upvar $varname stat
pack forget .fra1 .fra2 .fra3
pack configure .fra$stat -fill both -expand true
}
frame .fra0
radiobutton .fra0.rad1 -text "Frame 1" -indicatoron 0 -variable stat -value 1
radiobutton .fra0.rad2 -text "Frame 2" -indicatoron 0 -variable stat -value 2
radiobutton .fra0.rad3 -text "Frame 3" -indicatoron 0 -variable stat -value 3
pack .fra0.rad1 .fra0.rad2 .fra0.rad3 -side left
pack .fra0
frame .fra1 -relief raised -borderwidth 2 -width 50 -height 30
button .fra1.but1 -text Button1
pack .fra1.but1
frame .fra2 -relief raised -borderwidth 2 -width 50 -height 30
button .fra2.but1 -text Button2
pack .fra2.but1
frame .fra3 -relief raised -borderwidth 2 -width 50 -height 30
button .fra3.but1 -text Button3
pack .fra3.but1
=============================END OF TCL SCRIPT 1=========================
2) If you use vTcl, then you cannot use the packer for that, as unmanaged
widgets will not be saved (at least in vTcl 1.09). You have to use the
grid manager instead of. So the script will be more complicate.
=============================BEGIN OF TCL SCRIPT 2=========================
#!/usr/bin/wish4.2
global stat
set stat 1
trace variable stat w switch_frame
proc switch_frame {varname index op} {
upvar $varname stat
raise .fra$stat
}
frame .fra0
radiobutton .fra0.rad1 -text "Frame 1" -indicatoron 0 -variable stat -value 1
radiobutton .fra0.rad2 -text "Frame 2" -indicatoron 0 -variable stat -value 2
radiobutton .fra0.rad3 -text "Frame 3" -indicatoron 0 -variable stat -value 3
pack .fra0.rad1 .fra0.rad2 .fra0.rad3 -side left
pack .fra0
frame .hull
pack .hull -expand 1 -fill both
frame .fra1 -relief raised -borderwidth 2 -width 50 -height 30
button .fra1.but1 -text Button1
pack .fra1.but1
grid .fra1 -in .hull -row 0 -column 0 -sticky nesw
frame .fra2 -relief raised -borderwidth 2 -width 50 -height 30
button .fra2.but1 -text Button2
pack .fra2.but1
grid .fra2 -in .hull -row 0 -column 0 -sticky nesw
frame .fra3 -relief raised -borderwidth 2 -width 50 -height 30
button .fra3.but1 -text Button3
pack .fra3.but1
grid .fra3 -in .hull -row 0 -column 0 -sticky nesw
grid rowconfigure .hull 0 -weight 1
grid columnconfigure .hull 0 -weight 1
tkwait visibility .hull
raise .fra1
=============================END OF TCL SCRIPT 2=========================
Hope that helps.
Bye,
Cle.
--
| Clemens Hintze * ACB/EO ____ OMC-R Software Developement
| Phone: +49 30 7002-3241 \ / ALCATEL Mobile Communication Division ITD
| Fax : +49 30 7002-3851 \/ Colditzstr. 34-36, D-12099 Berlin, Germany
| mailto:[EMAIL PROTECTED]