Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. from tkinter import *
  2. selection_window = Tk()
  3. selection_window.wm_title("")
  4. selection_window.geometry('{}x{}'.format(200, 150))
  5. frame_1 = Frame(selection_window, width=200, height=30)
  6. Button(frame_1, text="Single",height = 100).pack(side=LEFT,anchor=S)
  7. Button(frame_1,text="Range",command=Toplevel,height = 20).pack(side=RIGHT,anchor=S)
  8. frame_1.pack()
  9. selection_window.mainloop()
  10.  
  11. from tkinter import *
  12. selection_window = Tk()
  13. selection_window.wm_title("")
  14. selection_window.geometry('{}x{}'.format(200, 150))
  15. frame_1 = Frame(selection_window, width=200, height=30)
  16. frame_1.pack()
  17. Button(frame_1, text="Single",height = 10).pack(side=LEFT, anchor=S, padx=[0,40])
  18. Button(frame_1,text="Range",command=Toplevel,height = 2).pack(side=RIGHT, anchor=S, padx=[20,0])
  19. selection_window.mainloop()
  20.  
  21. from tkinter import *
  22. import tkinter.ttk as ttk
  23. s=ttk.Style()
  24. print('Style themes on my system are ', s.theme_names())
  25. s.theme_use('clam')
  26. s.configure('bb.TButton', background='white', padding=50)
  27. b1=ttk.Button(text='Default')
  28. b1.pack(side=LEFT, anchor=S, padx=[0,40])
  29. b2=ttk.Button(text='Custom', style='bb.TButton')
  30. b2.pack(side=RIGHT, anchor=S, padx=[20,0])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement