Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. from Tkinter import *
  2. from ttk import *
  3.  
  4. def button(master, txt, line, col):
  5. new = Button(master, text=txt)
  6. new.grid(row=line, column =col, columnspan=2)
  7.  
  8. def frame(nb, txt):
  9. f = Frame(nb)
  10. nb.add(f, text = txt)
  11.  
  12. root = Tk()
  13. nb = Notebook(root)
  14. f1 = frame(nb, '1')
  15. f2 = frame(nb, '2')
  16.  
  17. button(f1, '1', 0, 0)
  18. nb.grid()
  19. root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement