[Tutor] Tkinter grid manager question
Chris Hare
chare at labr.net
Sun Nov 27 07:04:27 CET 2011
Hi everyone.
I am attempting to create a form for the user to complete. I have the basic layout and supporting code working, but I am having a problem with getting things to display in the grid the way I want them.
self.label1 = Label(self.frame, text = "Double click on a name from the list in the right. Make your changes in the field below and press the Save button.", fg="Blue", bg=backColor)
self.label2 = Label(self.frame, text = "Current Animal Types", fg="Blue", bg=backColor)
…...
self.label1.grid(row=1, column=0,columnspan=3, sticky=W)
self.label2.grid(row=2, column=0,columnspan=1, sticky=W)
self.list.grid(row=2, column=3, columnspan=2, sticky=W)
self.label3.grid(row=3, column=0,columnspan=1, sticky=W)
My problem is that the cell which contains the text for label2 is the same size as the text in label1. What I am trying to accomplish is to have the text in label1 span the entire window, instead of having a huge cell with all of the label1 text in it.
Ideas?
Thanks!
Chris
More information about the Tutor
mailing list