tackling the packer
- From: "k:arel" <karelnijs@xxxxxxxxx>
- Date: 18 Aug 2005 00:46:19 -0700
i'm experiencing some trouble here working with the packer (TCL-version
8.4 and tixwish8.1.8.3)
i add 2 frames to a master frame, named ".bottom", i've set different
colours so you can follow up my explanation
NB: you should maximize your window first!
* the master frame, .bottom, is coloured green
so everything green showing means the other frames don't expand like
they should do
* the top subframe, .bottom.fr_tit, is coloured red and is working
fine: it is at the top of the window and only expanded over X
* the lower subframe, .bottom.fr_can, is coloured blue and is NOT
working fine: for some reasen, it glues to the bottom and is NOT
expanding over Y (it is over X)
we're not seeing anything blue, but all green thus i've a fault
somewhere
but i AM adding the both subframes with "-side top", so normally they
should both be at the top of the window
the goal is: all the subframes, .bottom.fr_tit and .bottom.fr_can,
aligned at the top and only .bottom.fr_can expanded
my code
************************************************************
set fr ""
###
# extra, BOTTOM frame
##
eval frame ${fr}.bottom -background green
pack ${fr}.bottom -side top -padx 10 -pady 5 -fill both -expand 1
# frame for title of the BOTTOM frame
eval frame ${fr}.bottom.fr_tit -background red
pack ${fr}.bottom.fr_tit -side top -anchor n -fill x -expand 1
eval label ${fr}.bottom.fr_tit.lblTitle \
-borderwidth 1 \
-text {"Choosen checks"}
pack ${fr}.bottom.fr_tit.lblTitle -side left -anchor nw
###
# place "Required fields" label
##
eval label ${fr}.bottom.fr_tit.lblRequired \
-borderwidth 1 \
-text {"all fields are required"}
pack ${fr}.bottom.fr_tit.lblRequired -side right -anchor se -padx 5
###
# write all the checks + options-to-set in the BOTTOM frame
##
eval frame ${fr}.bottom.fr_can -background blue
pack ${fr}.bottom.fr_can -side top -anchor n -fill both -expand 1
set w ${fr}.bottom.fr_can
###
# creating the canvas and frame in canvas
##
# set a vertical scrollbar for the checks-containing frame
# you need a canvas for a "scrolling frame"
eval canvas ${w}.canvas -relief sunken \
-borderwidth 0 -highlightthickness 0 -background Gray90 \
-yscrollcommand {"${w}.yscroll set"}
eval scrollbar ${w}.yscroll -orient vertical \
-command {"${w}.canvas yview"}
# let it scroll, let it scroll, ...
eval bind ${w}.canvas <4> {"${w}.canvas yview scroll -1 units"}
eval bind ${w}.canvas <5> {"${w}.canvas yview scroll 1 units"}
pack ${w}.yscroll -side right -fill y
pack ${w}.canvas -side top -anchor n -fill both -expand 1
.
- Follow-Ups:
- Re: tackling the packer
- From: Gerald W. Lester
- Re: tackling the packer
- From: Bryan Oakley
- Re: tackling the packer
- Prev by Date: Re: tcl/tk advocacy
- Next by Date: Re: Pofiling or timing in TCL
- Previous by thread: serial terminal (slightly off topic)
- Next by thread: Re: tackling the packer
- Index(es):