New to Tkinter GUI building

Adonis Vargas adonis at REMOVETHISearthlink.net
Wed Feb 28 16:13:06 EST 2007


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



More information about the Python-list mailing list