Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- window = Tk()
- window.title("ToDo List by Justin Hagerty")
- window.geometry('400x310')
- #to add the spacers on each side of the UI
- window.columnconfigure(2, weight=1)
- class LPB():
- LPButtons = []
- class RPI():
- RPInput = []
- def addListItem():
- def removeListItem():
- print("removeListItem")
- def refreshList():
- print("refreshList")
- def windowPerm():
- leftPanelButton()
- rightPanelInput()
- window.mainloop()
- def leftPanelButton():
- LPB.LPButtons.append(Button(window, text="add", command=addListItem))
- LPB.LPButtons.append(Button(window, text="remove", command=removeListItem))
- LPB.LPButtons.append(Button(window, text="refresh", command=refreshList))
- i = 0
- for p in LPB.LPButtons:
- p.grid(row=int(i), column=0, columnspan=2, padx=10, pady=10)
- p.config(width=10)
- i = i + 1
- def rightPanelInput():
- RPI.RPInput.append(Entry(window, width=46))
- RPI.RPInput.append(Text(window, width=35, height=10))
- #RPI.RPInput.append(Entry(window))
- i = 0
- for p in RPI.RPInput:
- p.grid(row=int(i), column=2, columnspan=3, padx=10)
- i = i + 1
- RPI.RPInput[1].grid(rowspan=4)
- windowPerm()
Advertisement
Add Comment
Please, Sign In to add comment