def contact(): webbrowser.open("https://t.me/HarshaVardhan17_02") def stopsong(event): pygame.mixer.music.fadeout(1000) # ---------Creating Menus----------------- # ---------Creating Playlist menu---------- subMenu = Menu(menu) menu.add_cascade( label="Media Files", menu=subMenu) # Cascading Options on the ToolBar Such as: File Edit subMenu.add_command(label="Open Files", command=directorychooser) subMenu.add_separator() # -----------Creating Contact Menu---------- contactMenu = Menu(menu) menu.add_cascade(label="Contact Me", menu=contactMenu) contactMenu.add_command(label="Want Help Ping me", command=help) contactMenu.add_command(label="Report Error Ping me", command=contact) subMenu.add_separator() subMenu.add_command(label="Exit Player", command=exit) one1 = Label(window, text=" ").pack(fill=X)
root = Tk() root.wm_title("Pred/Prey Animator") yscrollbar = Scrollbar(root, orient=VERTICAL) yscrollbar.grid(row=0, column=2, sticky=N+S+W+E, rowspan=17, padx=10) xscrollbar = Scrollbar(root, orient=HORIZONTAL) xscrollbar.grid(row=18, column=1, sticky=N+S+W+E) playing_field = Canvas(root, width=600, height=600, yscrollcommand=yscrollbar.set, xscrollcommand=xscrollbar.set, scrollregion=(0, 0, 3000, 3000)) playing_field.scale(playing_field,.1,.1,10,10) yscrollbar.config(command=playing_field.yview) xscrollbar.config(command=playing_field.xview) #Menu Section menu = Menu(root) root.config(menu=menu) file_menu = Menu(menu) menu.add_cascade(label="File", menu=file_menu) file_menu.add_command(label="Reset Settings", command=reset_settings) file_menu.add_command(label="Reset Best Predators", command=reset_best_pred) file_menu.add_command(label="Reset Best Prey", command=reset_best_prey) file_menu.add_separator() file_menu.add_command(label="Open Predators", command=open_pred) file_menu.add_command(label="Open Prey", command=open_prey) file_menu.add_separator() file_menu.add_command(label="Save Predators", command=save_pred) file_menu.add_command(label="Save Prey", command=save_prey) file_menu.add_separator() file_menu.add_command(label="Close", command=playing_field.quit) help_menu = Menu(menu) menu.add_cascade(label="Help", menu=help_menu) help_menu.add_command(label="README", command=README_display) help_menu.add_command(label="About...", command=About_display)
root.geometry("800x600") root.columnconfigure(0, weight=1) root.rowconfigure(0, weight=1) # text text = Text(root) text.grid(row=0, column=0, sticky='nesw') vertical_scroller = Scrollbar(root, orient='vertical') vertical_scroller.grid(row=0, column=1, sticky='ns') horizontal_scroller = Scrollbar(root, orient='horizontal') horizontal_scroller.grid(row=1, column=0, sticky='ew') # add menu menu = Menu(root,tearoff = 0) root.config(menu=menu) # file menu filemenu = Menu(menu) menu.add_cascade(label="Menu", menu=filemenu) filemenu.add_command(label="Log In", command = log_in ) filemenu.add_command(label="Log Out", command=Log_out ) filemenu.add_separator() filemenu.add_command(label="Create Manager", command = cm ) filemenu.add_command(label="Create Employee", command = ce ) filemenu.add_command(label="Modify") filemenu.add_separator() filemenu.add_command(label="Exit", command=root.quit) # store menu storemenu = Menu(menu) menu.add_cascade( label="Store",menu = storemenu ) storemenu.add_command(label="Sale",command = sale ) storemenu.add_command(label="Search",command = search ) storemenu.add_command(label="Delete",command = delete ) storemenu.add_command(label="Modify", command = building )