Advertisement
Guest User

Untitled

a guest
Apr 27th, 2017
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. #!/usr/bin/python
  2. #!/home/lubuntu/subscription_app
  3.  
  4. from Tkinter import *
  5. from ttk import *
  6. #from subscription_app.enter import *
  7. import tkFileDialog
  8.  
  9.  
  10. class start(Frame):
  11.  
  12. def __init__(self, parent):
  13. self.parent = parent
  14. Frame.__init__(self, parent)
  15. self.initUI()
  16. self.menubar()
  17. self.onExit()
  18. self.statusbar()
  19. self.bottom_button()
  20.  
  21. def initUI(self):
  22. self.parent.title("Ocg4gnSregttgty")
  23. self.centerWindow()
  24. self.pack()
  25.  
  26. def menubar(self):
  27. menubar = Menu(self.parent)
  28. self.parent.config(menu=menubar)
  29. fileMenu = Menu(menubar)
  30. menubar.add_cascade(label="File", menu=fileMenu)
  31. fileMenu.add_command(label="???")#command=)
  32. fileMenu.add_separator()
  33. fileMenu.add_command(label="Exit", command=self.onExit)
  34.  
  35. def statusbar(self):
  36.  
  37. status = Label(self, text="preparing to do nothing", relief=SUNKEN, anchor=S)
  38. status.pack(expand=TRUE, side=BOTTOM, fill=X)
  39.  
  40. def bottom_button(self):
  41. saveButton = Button(self, text="Save member details") ##, command=)
  42. saveButton.pack(side=BOTTOM, padx=5, pady=5)
  43. addButton = Button(self, text="Add member")
  44. addButton.pack(side=BOTTOM)
  45.  
  46. def onExit(self):
  47. self.quit()
  48.  
  49. def centerWindow(self):
  50. w = 600
  51. h = 500
  52. sw = self.parent.winfo_screenwidth()
  53. sh = self.parent.winfo_screenheight()
  54. x = (sw - w)/2
  55. y = (sh - h)/2
  56. self.parent.geometry('%dx%d+%d+%d' % (w, h, x, y))
  57.  
  58.  
  59. def main():
  60.  
  61. root = Tk()
  62. app = start(root)
  63. root.mainloop()
  64.  
  65. if __name__ == '__main__':
  66. main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement