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
- class start(Frame):
- def __init__(self, parent):
- self.parent = parent
- Frame.__init__(self, parent)
- self.initUI()
- self.menubar()
- self.onExit()
- self.statusbar()
- self.bottom_button()
- def initUI(self):
- self.parent.title("Ocg4gnSregttgty")
- self.centerWindow()
- self.pack()
- def menubar(self):
- menubar = Menu(self.parent)
- self.parent.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=self.onExit)
- def statusbar(self):
- status = Label(self, text="preparing to do nothing", relief=SUNKEN, anchor=S)
- status.pack(expand=TRUE, side=BOTTOM, fill=X)
- def bottom_button(self):
- saveButton = Button(self, text="Save member details") ##, command=)
- saveButton.pack(side=BOTTOM, padx=5, pady=5)
- addButton = Button(self, text="Add member")
- addButton.pack(side=BOTTOM)
- def onExit(self):
- self.quit()
- def centerWindow(self):
- w = 600
- h = 500
- sw = self.parent.winfo_screenwidth()
- sh = self.parent.winfo_screenheight()
- x = (sw - w)/2
- y = (sh - h)/2
- self.parent.geometry('%dx%d+%d+%d' % (w, h, x, y))
- def main():
- root = Tk()
- app = start(root)
- root.mainloop()
- if __name__ == '__main__':
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement