hi guys. Noobie here! My code is not working for whatever reason. I noticed when I comment the DropDown list (from "For Incident Type" section) commands, the window comes up but when I uncomment, the code runs but no window pops up.. Any ideas why?? Also, how do you update the Status bar when you click a button, something like "You clicked button X"? Or how do you make different section (like in Word for word and character count? and how to update one section when hovering over with the mouse? Much appreciated for your help!! Code below:
root = Tk()
##### Create main menu ###########
mainmenu = Menu(root) root.config(menu = mainmenu) submenu = Menu(mainmenu)
mainmenu.add_cascade(label = "File", menu=submenu)
submenu.add_command(label = "New Project", command=doNothing)
submenu.add_separator()
submenu.add_command(label = "Exit", command= exitfunc)
editmenu = Menu(mainmenu) mainmenu.add_cascade(label = "Edit", menu=editmenu) editmenu.add_command(label = "Redo", command = doNothing)
##### Toolbar
toolbar = Frame(root, bg="blue")
insertButt = Button(toolbar, text = "Insert image", command = InsertImgcmd)
insertButt.pack(side=LEFT, padx = 2, pady=2)
printButt = Button(toolbar, text="Print", command = doNothing)
printButt.pack(side=LEFT, padx = 2, pady=2)
toolbar.pack(side=TOP, fill=X)
##### Creating variables
var = StringVar()
##### Create Dropdown list for Incident Type
LabelTypeDDL = Label(root, text="Type").grid(row=2, column=1, sticky=W)
TypeDDL = OptionMenu(root, var, NORMAL, PARENT, CHILD, FLWALK)
TypeDDL.configure(font=("Calibri", 15))
TypeDDL.grid(row=5, column=0)
#### Statusbar
statusbar = Label(root, text=statusmessage, bd=1, relief=SUNKEN, anchor=W)
statusbar.pack(side=BOTTOM, fill=X)
root.title("Summary Tool") root.geometry("300x200") root.mainloop()