New to Tkinter GUI building

Adam adamgarstang at googlemail.com
Wed Feb 28 17:23:13 EST 2007


On Feb 28, 9:13 pm, Adonis Vargas <ado... at REMOVETHISearthlink.net>
wrote:
> Adam wrote:
>
> <snip>
>
> > I think my main questions are:
> > 1. How can I get the Window to be sized the way I want it?
> > 2. How can I get the Scrollbars to fill the side of the text box
> > instead of being small? (like .pack(fill= tk.Y)
>
> <snip>
>
> > I have only posted the code relevant to the GUI.
>
> > TIA
> > Adam
>
> To size the window use Tk's geometry method
>
>      self.top.geometry("%dx%d%+d%+d" % (800, 600, 0, 0)) # (width,
> height, x, y)
>
> For the scrollbar to fill vertically, use the sticky grid option.
>
>      self.scrlr1.grid(row=0, column=1, sticky=tk.N + tk.S)
>
> Hope this helps.
>
> Adonis

Can't test now as its late in th UK and I'm going to bed. Looks good
though.
So remove the size from the frames etc and use the geometry method
instead? Then use grid to "pack" them for want of a better word?




More information about the Python-list mailing list