Tkinter Problem

Maboroshi nobody at hotmail.com
Sun Oct 24 00:02:05 CEST 2004


Why when I use the sticky command with the grid layout manager won't my 
Listbox expand it stays in the center maybe I am missing something but 
from every tutorial I see it says to do it this way

I am running Python2.3.4 on winxp I haven't tried it on linux yet

Any Ideas are appreciated

Let me know if I am not being clear enough

Cheers

Andrew


from Tkinter import *


class App(Frame):
     def __init__(self, master=None):
         Frame.__init__(self, master)
         self.grid()
         self.createWidgets()

     def createWidgets(self):
         self.listbox = Listbox(self)
	# RIGHT HERE THIS WON'T EXPAND TO FILL
         self.listbox.grid(row=0, column=0, rowspan=3, sticky=N+E+S+W)

         self.connect = Button(self, text="Connect")
         self.connect.grid(row=0, column=1)
         self.execute = Button(self, text="Execute")
         self.execute.grid(row=1, column=1)
         self.disconnect = Button(self, text="Disconnect")
         self.disconnect.grid(row=2, column=1)

         self.entry = Entry(self)
         self.entry.grid(row=3, column=0, columnspan=2, sticky=E+W)


app = App()
app.master.title("MySQL DB Project")
app.master.minsize(400, 300)
app.mainloop()



More information about the Python-list mailing list