[TCLCORE] grid behavior
by Edward Peschko other posts by this author
Apr 8 2008 5:01PM messages near this date
[TCLCORE] Organizing contributions
|
Re: [TCLCORE] grid behavior
hey all,
I've been trying to do something extremely simple in tcl, and have been
running into roadblocks..
Namely, I've been trying to create an application with three panes, using
'pack' to pack the first two panes into the top window, and then using
'grid' to subdivide the lower pane. I want something like this:
----------------------
| |
----------------------
|TEXT |TEXT2 |
----------------------
where TEXT is left justified to one grid panel, and TEXT2 is LEFT justified
to the other grid panel in the second pane.
In any case, no matter what I do, I can't get the text to left justify. It
sits in the center of the pane, like the grid items themselves aren't
divided evenly. I'm wondering, is this an inherent way that grid works? And
is there a way to see exactly which screen real estate is controlled by
which grid? Is there a 'pack/grid' tutorial?
Thanks much,
Ed
(
ps - if there is a more appropriate, 'users' list that is take.. but the
users' lists I've seen seem to all be taken over by spam..
)
(
pps - fyi, here is the code I'm using:
wm title . {mydisplay}
image create photo banner_image.gif -file banner_image.gif
winfo children .
label .l -borderwidth 1 -image banner_image.gif -relief solid -text a
pack .l -side top
winfo children .
frame .f -bd 2 -borderwidth 2 -width 50
grid columnconfigure .f 1 -minsize 50 -pad 0
grid columnconfigure .f 2 -minsize 50 -pad 0
pack .f -side top
winfo children .f
label .f.l -text AHA -anchor w -justify left
grid .f.l -in .f -column 1 -row 1 -columnspan 1 -rowspan 1 -sticky news
winfo children .f
label .f.l2 -text AHA2 -anchor w -justify left
grid .f.l2 -in .f -column 2 -row 1 -columnspan 1 -rowspan 1 -sticky news
)
Thread:
Edward Peschko
Brian Griffin
|