-1

I am working on a GUI that will access 4 or more tables in a database for a small used car sales/repair shop. The interface requires being able to switch back and forth between different viewing and entry screens with out losing any information entered. For example, a person should be able to be in the middle of entering a new vehicle and be able to switch over to viewing the parts inventory with out losing the progress of entering a new vehicle. Interruptions like this are common in small shops, so having the shop change it's MO will not be reasonable.

I have chased this around experimenting with toplevel windows, withdrawing, lifting, etc. The ideal thing would be something like a tabbed browser or the tabs in Excel. What method of handling windows, frames, or widgets do people prefer for doing this?

Is there a way to stack frames one on top of another so that they obstruct the frame underneath? frame_A has 10 widgets. frame_B has 5 widgets. Some_buttons to withdraw/lift the frames for viewing/editing. can I put frame_A directly ontop of frame_B with out the widgets in frame_B making the widgets in frame_A shift around?

  • This question is too broad, but you might find e.g. this useful: http://stackoverflow.com/a/26213779/3001761 – jonrsharpe Oct 23 '14 at 14:28
  • @jonrsharpe I very much disagree that the question is too broad. A Google search will generates a vast number of questions along these lines, almost all of them answered poorly because the person did not start out asking this very question - they just started writing code until they got stumped. Please remove the down vote, others might find this useful. Thank you for the link, it is very much like what I had started on, but much better than what I had. Your link is by far the best answer on how to switch/hide frames/widgets with out losing entries. – joshua43214 Oct 23 '14 at 21:47
  • You're entitled to your opinion (and I mine). That being said, you ask *two* questions, one of which is explicitly opinion-based and the other of which is either yes/no or a request for code. SO questions, of whatever quality, are not the only option; you can also do your own research ("tkinter stack frames" and "tkinter tabbed" would be good starting points). – jonrsharpe Oct 23 '14 at 21:56

1 Answers1

0

Tkinter has notebook tabs, by way of the ttk module.

Tkinter also gives you enough tools to create your own tab-like interface if you wish. If you use grid or place you can stack frames on top of each other and change which one is on top.

Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685
  • Thank you. I have not played with ttk yet, I'm still working on my fluency with tk. I will probably use the solution linked above to manage the UI, but being able to have multiple tabs open in each frame will be very useful. – joshua43214 Oct 23 '14 at 21:56