high5stor...@gmail.com wrote: >> from tkinter import * >> from tkinter import ttk >> >> root = Tk() >> root.geometry("822x600+100+100") >> nav_bar = ttk.Frame(root, borderwidth=2, relief='ridge', padding=(10, 3, >> 10, 3)) >> >> btn_first = ttk.Button(nav_bar, text='|<', width=4) # for buttons >> root.mainloop() > > Hmm - this only gives me an empty window (no errors).
That's strange. If you ran the script in Idle, try again from the commandline. > What puzzles me that every book/site on tkinter strongly warns of mixing > pack and grid managers... You can mix pack and grid for one window, but you have to pick one layout manager per parent widget: top = Toplevel(root) panel = Frame(top) panel.pack(...) # we picked pack() and now have to use it for all # children of top canvas = Canvas(top, ...) canvas.pack(...) # must use pack() again # we are free to pick a layout for panel ok = Button(panel) ok.grid(...) # we picked grid() and now have to use it for all # children of panel cancel = Button(panel) cancel.grid(...) # must use grid() -- https://mail.python.org/mailman/listinfo/python-list