Groups are the newest way to create multi-screened applications. They allow for you to combine multiple static screens, to act as individual 'pages' of a single, dynamic window.
Consider groups like a slideshow. Each page in a group is like an individual slide. The window has the ability to move between each individual slide, and can show and hide each slide at will.
Merge multiple .pygui files into a single group file using the group functionality.
You need to show a page upon first running the GUI or else the screen will be blank.
Show/hide a screen using <guiName>.hide<pagename>Widgets() and <guiName>.show<pagename>Widgets().
Each widget within a page has appended to its title _<pagename>. So a label called Label1 for a page called Page would be called Label1_Page.
First, each individual page should be created as a separate screen within GUI Pie. Ensure that every page has the same GUI properties (size, background colour etc). Once each file has been created, select the 'New Group' option on the GUI Pie home page. Customise the properties of this group in the setup screen, and add your individual files. You can check that each file has been added to the group by consulting the dropdown on the setup screen.
WARNING: Ensure you are satisfied with the title for each individual page, as these cannot be changed once merged into a group.
After saving your group, you will have a .group file which contains a copy of all files added to the group. This means that the group does not need a direct reference to the individual .pygui files that have been added to it.
Editing groups work in the same manner as editing screens. Upon opening the group file, select which file in the group you would like to edit. This will allow you to edit that specific screen in the same manner as would be done for editing a single screen.
However, there are two important differences:
There is no autosave feature, as there would be for a single screen. This means that the convert + save button needs to be clicked each time you want a save to be permanent. Saving a file will delete undo history.
Editing GUI property fields will edit the properties for the entire group. Any changes made to GUI properties in one page in a group, will be applied to every page. This is with the exception of background images, which remain unique to every page.
The group will be exported as a single .py file. This is accessed via python in the same way as a standard screen would be. However, there are some group specific methods that can be used.
<guiName>.showAllWidgets() and <guiName>.hideAllWidgets() will hide/show every widget from every group. However, the window itself will still remain visible (yet blank).
<guiName>.hide<pagename>Widgets() and <guiName>.show<pagename>Widgets() will hide/show every widget from a specific page. For example, a page with a title of 'Page', as part of a GUI group called 'root', would be hidden by root.hidePageWidgets()
A combination of <guiName>.hideAllWidgets() and <guiName>.show<pagename>Widgets() allows you to change the visible page on the screen.
Each widget within a page has appended to its title _<pagename>. So a label called Label1 for a page called Page would be called Label1_Page.
The window will initially open blank until a page is shown. Before running <gui>.run(), ensure that show<pagename>Widgets() has been called at least once for a page.