def createmat_window():
mat = Toplevel(cal)
frame1 = Frame(mat,bg='red',width=100,height=100).pack()
choices = {'1', '2', '3', '4', '5'}
pop = OptionMenu(frame1, opt1,*choices)
pop.pack()
opt1.set('1')
cal = Tk() # (ROOT_WINDOW )
cal.title("calculator")
opt1 = StringVar()
Matrix = Button(cal, padx=16, bd=8, fg="black", font=('arial', 15, 'bold'),
text="MAT", bg="honeydew3", command=createmat_window)
Matrix.grid(row=5, column=10)
it's giving me error _tkinter.TclError: cannot use geometry manager pack inside . which already has slaves managed by grid
but i have read that we can use different geometry managers in different windows irrespective of what other windows are using.