-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ttk.Notebook for tabbed display of multiple Presenters
The system is slightly hacky, because the Presenter is not independent from the main window - indeed, it knows that it has to place itself in a root's notebook as opposed to *being* placed by the Main object. It's a fairly simple mechanism though: the root constructs a ttk.Notebook, builds a Presenter and orders it to place itself in a given tab - the Presenter knows that it is supposed to occupy a single whole tab (and there will be nothing else besides it in it), so it can grid itself simply at (0,0). Then it just calls `add` on the root's notebook to create the tab. By the way, the Main window construction was slightly refactored: "__construct" does not make much sense now that everything is built by the child objects, and the only thing Main does besides providing space for them is building a control panel.
- Loading branch information
Showing
2 changed files
with
25 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters