Re: Left Alignment -- Tkinter
Alan Gauld <alan.gauld <at> btinternet.com>
2009-04-01 21:03:32 GMT
"W W" <srilyk <at> gmail.com> wrote
> Good news... I got it!
>
> Here's something that's often a good idea when debugging overlapping
> layouts
> (especially when you didn't design the parent!) - use different
> backgrounds!
Yes, or for Frames use a relief value to see where the frame bounds are.
> Here's my changes (also found here: http://rafb.net/p/clKroD65.html )
Here is my stripped down version that does what I think you want::
def body(self, master):
self.title("Enter Site/Misc. Data")
# Heading
fLocationTitle = Frame(master, height=7)
fLocationTitle.pack()
Label(fLocationTitle, text="Geographic Location").pack()
# Latitude and Longitude
fCoords = Frame(master)
fCoords.pack()
Label(fCoords, text='Latitude:').grid(row=0, column=0, padx=5)
self.lat = Entry(fCoords, width=12)
self.lat.grid(row=0, column=1, padx=5)
Label(fCoords, text='Longitude:').grid(row=0, column=2, padx=5 )
self.long = Entry(fCoords, width=12)
self.long.grid(row=0, column=3, padx=5)
I removed quirte a lot of the redundant code that was cluttering things
up and moved the frames to beside the widgets that are contained
within them.
HTH,
Alan G.
Back from vacation...
_______________________________________________
Tutor maillist - Tutor <at> python.org
http://mail.python.org/mailman/listinfo/tutor