Im working on my first big project, a GUI library for movie files (much like in itunes). so far i have the ability to list the movies title director and year in a list box as well as add movies to the database, however it is only text no actual movie files. is there a way for me to link the movie file to the text in the listbox?
what i am specifically looking for is when the user is adding the title year director and such (using Tkinter Entry widget) a ask file dialog will show up for the user to select the movie. so later i can click on it in the list and it will open the movie
global titleadd, directoradd, yearadd
addboard = Tkinter.Toplevel()
addboard.title("Add a movie")
addboard.geometry("450x100")
#addboard(padx=10, pady=10)
print "add"
#adding the title
lbtitle = Tkinter.Label(addboard, text = "Enter the movie's title:")
lbtitle.grid(row = 1, column = 1)
titleadd = StringVar()
entitle = Tkinter.Entry(addboard, textvariable = titleadd)
entitle.grid(row = 1, column = 3)
entitle.insert(0, "Title")
#adding the director
lbdirector = Tkinter.Label(addboard, text = "Enter the mmovie's director:")
lbdirector.grid(row = 2, column = 1)
directoradd = StringVar()
endirector = Tkinter.Entry(addboard, textvariable = directoradd)
endirector.grid(row = 2, column = 3)
endirector.insert(0, "Director")
#adding the year
lbyear = Tkinter.Label(addboard, text = "Enter the movie's year:")
lbyear.grid(row = 3, column = 1)
yearadd = StringVar()
enyear = Tkinter.Entry(addboard, textvariable = yearadd)
enyear.grid(row = 3, column = 3)
enyear.insert(0, "Year")
#if a value is left blank program will ask what to do
#to be added later
#The button and the commands to put it all together
btnok = Tkinter.Button(addboard, text = "Continue", command = addcontinue)
btnok.grid(row= 5, column = 4)
btncancel = Tkinter.Button(addboard, text = "Cancel", command=addboard.destroy)
btncancel.grid(row = 5, column = 1)
i know i havent been too clear, also this isnt the full program as im running close to 500 lines right now but i can post it if needed