[Activetcl] table and scrollbar issues
by Gene Osteen other posts by this author
May 30 2008 7:53AM messages near this date
view in the new Beta List Site
[Activetcl] teapot metadata question
|
Re: [Activetcl] table and scrollbar issues
All,
I have created a table with both x and y scroll bars. The
code is below. My problem is when I add data to the cells array I modify
the width of the columns to show all the text. When the columns expand,
I expected the actual table width to stay the same, but the table itself
seems to grow and the Y scroll bar vanishes off the right side of the
screen. I have to make the window bigger to see the scroll bar and it
seems to have a lot of space between the scrollbar and the table widget.
Can someone explain what I am doing wrong.
frame .tf.rec
pack .tf.rec -side right -expand 1 -fill both -pady 5 -padx 5
frame .tf.rec.btns
pack .tf.rec.btns -side top -expand 1 -fill both -pady 5
button .tf.rec.btns.load -text "Load Record" -command {load_record}
pack .tf.rec.btns.load -side left -expand 1 -fill x -pady 1
frame .tf.rec.fldlst
#pack .tf.rec.fldlst -side top -expand 1 -fill both -pady 5 -padx 5
pack .tf.rec.fldlst -side top -expand 1 -fill both
scrollbar .tf.rec.fldlst.yscroll -command ".tf.rec.fldlst.tb yview"
scrollbar .tf.rec.fldlst.xscroll -command ".tf.rec.fldlst.tb xview"
-orient horizontal
table .tf.rec.fldlst.tb -rows 25 -cols 4 -yscroll
".tf.rec.fldlst.yscroll set"
-xscroll ".tf.rec.fldlst.xscroll set" -font {Helvetica 10}
-variable cells
-titlerows 1 -width 50
pack .tf.rec.fldlst.xscroll -side bottom -expand 1 -fill x
pack .tf.rec.fldlst.tb -side left -expand 1 -fill y
pack .tf.rec.fldlst.yscroll -side left -fill y
Thread:
Gene Osteen
Jeff Hobbs
|