Advertisement
TankorSmash

Untitled

Nov 3rd, 2012
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.97 KB | None | 0 0
  1. from tkinter import *
  2.  
  3. class Application(Frame):
  4.     """ GUI application. """
  5.     def __init__(self, master):
  6.         """ Initialize the frame. """
  7.         super(Application, self).__init__(master)  
  8.         self.grid()
  9.         self.create_widgets()
  10.  
  11.         frame = Frame(master)
  12.         frame.pack()
  13.  
  14.     def create_widgets(self):
  15.        
  16.         # create instruction label
  17.         self.inst_lbl = Label(self, text = "Test")
  18.         self.inst_lbl.grid(row = 1, column = 1, columnspan = 2, sticky = W)
  19.  
  20.        
  21.         # create submit button
  22.         self.submit_bttn = Button(self, text = "OK", command = ?????)
  23.         self.submit_bttn.grid(row = 3, column = 2, sticky = W)
  24.  
  25.       # create submit button
  26.         self.submit_bttn = Button(self, text = "Cancel", command = ????)
  27.         self.submit_bttn.grid(row = 3, column = 4, sticky = W)
  28.    
  29.  
  30. # main
  31. root = Tk()
  32. root.title("Test")
  33. root.geometry("100x50")
  34.  
  35. app = Application(root)
  36.  
  37. root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement