Hello. I am trying to create an input window that prompts for two files.
I created two frames, frame1 and frame2. I inserted a label and entry widget in each frame.
When I run the program, it puts everything on a single line.
I would like to put the prompts on separate lines.
Below is an excerpt of the code I wrote.
Thanks in advance!
I created two frames, frame1 and frame2. I inserted a label and entry widget in each frame.
When I run the program, it puts everything on a single line.
I would like to put the prompts on separate lines.
Below is an excerpt of the code I wrote.
Thanks in advance!
mw = Tk()
# 999x999 is size of window, 999+999 is the location of the window
mw.geometry('800x400+400+200')
mw.title("Test Program")
frame1 = Frame(mw).pack(side=TOP,anchor=W,fill=X,expand=YES)
frame2 = Frame(mw).pack(side=TOP,anchor=W,fill=X,expand=YES)
framebot = Frame(mw).pack(side=BOTTOM,anchor=W,fill=X,expand=YES)
w1 = Label(frame1, text="Input File: ",font=("Times",25)).pack(side=LEFT)
e1 = Entry(frame1,width=25,font=("Times",25))
e1.insert(0, "infile.txt")
e1.pack(side=LEFT)
Button(frame1,text='Search',font=("Times",25),command=get_file1).pack(side=LEFT)
w2 = Label(frame2, text="Output File: ",font=("Times",25)).pack(side=LEFT)
e2 = Entry(frame2,width=25,font=("Times",25))
e2.insert(0, "outfile.txt")
e2.pack(side=LEFT)
Button(frame2,text='Search',font=("Times",25),command=get_file2).pack(side=LEFT)
Button(framebot,text='Go',font=("Times",25),command=show_entry_fields).pack()
Button(framebot,text='Exit',font=("Times",25),command=mw.quit).pack()
mw.mainloop()
