column = 0, za Add
column = 1, za Remove
column = 2, za Edit
Međutim, pogledajte kako ih poređa.
Kako da to rešim? Zar ne postoji opcija da se widgeti place-uju npr height = 30, width = 30?
Evo šta sam uradio:
Code:
def createWidgets(self):
listBox = Listbox().grid(row=1)
buttonAdd = Button(self.root,
text = "Add",
command = self.addItem).grid(row = 2, column = 0, sticky = W)
buttonRemove = Button(self.root,
text="Remove",
command = self.removeItem).grid(row = 2, column = 1, sticky = W)
buttonEdit = Button(self.root,
text="Edit",
command = self.editItem).grid(row = 2, column = 2, sticky = W)
def createWidgets(self):
listBox = Listbox().grid(row=1)
buttonAdd = Button(self.root,
text = "Add",
command = self.addItem).grid(row = 2, column = 0, sticky = W)
buttonRemove = Button(self.root,
text="Remove",
command = self.removeItem).grid(row = 2, column = 1, sticky = W)
buttonEdit = Button(self.root,
text="Edit",
command = self.editItem).grid(row = 2, column = 2, sticky = W)