P
PGMoscatt
Hi All,
I am trying to create a dialog which will have a number of components but
having trouble with the placement of various widgets.
For example, in my code below you will see I am trying to insert alabel but
I want the label to be in the top-left of the dialog but it dosen't want to
go there.
What am I doing wrong ?
Pete
from Tkinter import *
class show_settings_dialog:
def __init__(self,parent):
top = self.top = Toplevel(parent)
top.title("General Settings...")
top["height"]=300
top["width"]=300
top.pack_propagate(0)
l1 = Label(top,text="User Name:").grid(row=0, sticky=W)
b = Button(top,text="Ok",command=self.ok)
b.pack(pady=40)
def ok(self):
self.top.destroy()
I am trying to create a dialog which will have a number of components but
having trouble with the placement of various widgets.
For example, in my code below you will see I am trying to insert alabel but
I want the label to be in the top-left of the dialog but it dosen't want to
go there.
What am I doing wrong ?
Pete
from Tkinter import *
class show_settings_dialog:
def __init__(self,parent):
top = self.top = Toplevel(parent)
top.title("General Settings...")
top["height"]=300
top["width"]=300
top.pack_propagate(0)
l1 = Label(top,text="User Name:").grid(row=0, sticky=W)
b = Button(top,text="Ok",command=self.ok)
b.pack(pady=40)
def ok(self):
self.top.destroy()