SHARE
TWEET

Untitled

a guest Nov 19th, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import tkinter
  2.  
  3. from tkinter.constants import *
  4. from tkinter.ttk import *
  5.  
  6. tk = tkinter.Tk()
  7. frame = tkinter.Frame(tk, relief=RIDGE, borderwidth=2)
  8. frame.pack(fill=BOTH,expand=1)
  9. tk.title('Arg Bot')
  10. tk.minsize(300,300)
  11. tk.geometry("300x300")
  12.  
  13. # Setup Menu
  14. menubar = tkinter.Menu(frame)
  15. filemenu = tkinter.Menu(menubar, tearoff = 0)
  16. filemenu.add_separator()
  17. filemenu.add_command(label = "Exit", command = tk.quit)
  18.  
  19. # Add Menu
  20. menubar.add_cascade(label = "File", menu = filemenu)
  21.  
  22. # title_label = tkinter.Label(frame, text="Arg arg arg", anchor="w")
  23. # title_label.pack(fill=X, expand=1)
  24.  
  25. results_listbox = tkinter.Listbox(frame, bd = 2, height=13, width=33)
  26. results_listbox.pack(side=BOTTOM, fill=X, expand=True)
  27.  
  28. tree_column_labels = ("File Name", "Size", "Seeds", "Leeches")
  29. results_tree = Treeview(columns=tree_column_labels, show='headings')
  30. ysb = tkinter.Scrollbar(orient=VERTICAL, command= results_tree.yview)
  31. xsb = tkinter.Scrollbar(orient=HORIZONTAL, command= results_tree.xview)
  32. results_tree['yscroll'] = ysb.set
  33. results_tree['xscroll'] = xsb.set
  34. results_tree.pack(side=BOTTOM, fill=X, expand=True)
  35.  
  36. #search_label = tkinter.Label(frame, text="Search:", anchor="w")
  37. search_label = tkinter.Label(frame, text="Search:", anchor="w")
  38. search_label.pack(fill=X, side="left")
  39.  
  40. variable = tkinter.StringVar(frame)
  41. variable.set("All") # default value
  42.  
  43. search_entry = tkinter.Entry(frame, bd = 2)
  44. search_entry.pack(side = "left", fill=X)
  45. search_options_menu = tkinter.OptionMenu(frame, variable, 'All', 'Applications', 'Books', 'Movies', 'Music')
  46. search_options_menu.pack(side="left", fill=X)
  47.  
  48. go_button = tkinter.Button(frame, text="Go")
  49. go_button.pack(side="left", fill=X)
  50.  
  51.  
  52.  
  53. # button = tkinter.Button(frame,text="Exit",command=tk.destroy)
  54. # button.pack(side=BOTTOM)
  55. tk.config(menu = menubar)
  56. tk.mainloop()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top