Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- #!/home/lubuntu/subscription_app
- from Tkinter import *
- from ttk import *
- #from subscription_app.enter import *
- import tkFileDialog
- window = Tk()
- window.configure(bg='lightgrey')
- window.title("Odsgsdgsy")
- ## resize screen ##
- w = 600
- h = 500
- sw = window.winfo_screenwidth()
- sh = window.winfo_screenheight()
- x = (sw - w)/2
- y = (sh - h)/2
- window.geometry('%dx%d+%d+%d' % (w, h, x, y))
- ## text above boxes ##
- lbl1 = Label(window, text="Members List:")
- lbl2 = Label(window, text="Member Information:")
- lbl1.grid(row=0, column=0, sticky=W)
- lbl2.grid(row=0, column=1, sticky=W)
- ## boxes resize with screen ##
- frm = Frame(window)
- frm.grid(row=1, column=0, sticky=N+S)
- window.rowconfigure(1, weight=1)
- window.columnconfigure(1, weight=1)
- ## member list box with scroll ##
- scrollbar = Scrollbar(frm, orient="vertical")
- scrollbar.pack(side=RIGHT, fill=Y)
- listNodes = Listbox(frm, width=20, yscrollcommand=scrollbar.set, font=("Helvetica", 12))
- listNodes.pack(expand=True, fill=Y)
- scrollbar.config(command=listNodes.yview)
- ## member details box ##
- listSelection = Listbox(window, height=4, font=("Helvetica", 12))
- listSelection.grid(row=1, column=1, sticky=E+W+N)
- ## all buttons ##
- saveButton = Button(window, text="Save member details") ##, command=)
- saveButton.grid(row=1, column=1, sticky=W)
- addButton = Button(window, text="Add member")
- addButton.grid(row=2, column=0, sticky=W, pady=10)
- deleteButton = Button(window, text="delete member")
- deleteButton.grid(row=2, column=0, pady=10)
- ## status bar ##
- status = Label(window, text="preparing to do nothing", relief=SUNKEN, anchor=S)
- status.grid(sticky=W+E, columnspan=2)
- ## menu bar ##
- menubar = Menu(window)
- window.config(menu=menubar)
- fileMenu = Menu(menubar)
- menubar.add_cascade(label="File", menu=fileMenu)
- fileMenu.add_command(label="???")#command=)
- fileMenu.add_separator()
- fileMenu.add_command(label="Exit") #command=window.onExit)
- # def onExit(self):
- # self.quit()
- for x in range(100):
- listNodes.insert(END, x)
- for x in "ABCD":
- listSelection.insert(END, x + ": ?")
- window.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement