Ceci est une ancienne révision du document !
PAGE 8.0 RELEASED
Well, it’s now 2024 and with the new year, we have a new PAGE GUI designer available. On January 1st, PAGE 8.0 was uploaded to the Sourceforge repository.
I’ll try to highlight some of the important changes that have been implemented in the new version.
If you’ve ever run PAGE before, you will probably notice the first change immediately on the Main menu window (shown below).
PAGE 8.0 now supports Tcl themes in the designer. You’ve always been able to use the ttk Widgets easily, but they always were shown from the “default” theme for your OS. If you were running Linux, that theme would be named “default”, if you were running Windows (heaven forbid!!!!) then it should be “vista” and under mac OS x, it should be “aqua”.
The problem would show up when you changed to a different theme. Since you couldn’t change the theme in the Designer, any differences in widget size or anything else that was theme based, meant that you would most likely need to rework the GUI from memory or a screenshot to make the new theme work. A major problem to say the least.
Now with PAGE 8, you can select any of the themes that PAGE supports (the OS theme set plus the 12 included themes) simply by clicking on the dropdown combo box pick a theme and (pardon the expression) BAM! You now can see what everything will look like when using the theme (shown left).
As you can see, in the PAGE 8.0 Test #5 image, you see exactly what the theme does to the ttk widgets. Most third party themes (like the cornsilk-dark theme) use images to modify some of the look and feel of various ttk widgets. Remember, Themes only modify the ttk widgets, not the Tk widgets.
PAGE 8.0 also provides a theme chooser, a quick demo of most of the ttk widgets with a combo box to switch between all the different themes that PAGE knows about, including the various OS based themes as well. As you change themes in the theme chooser, the theme switches for the main design form as well.
One of the nice things about PAGE using the actual theme in the design process is the ability to see how different built in styles for different widgets affect the widgets on the Toplevel form.
For example, all ttk::button widgets (this includes the TButton, TCheckbutton and the TRadiobutton) have a built in style called “Toolbutton”. This gives the widget a “flat” appearance which really looks nice in a Button bar type menu.
This shows the TButton in “normal” style.
This, however, is how the same button looks when the “Toolbutton” style is applied. Notice there is no border around the button widget.
Not all ttk widgets have special styles and some themes have styles for some widgets that other themes don’t have. Take for example the TNotebook widget. Most of the themes that I designed for PAGE 8.0 (notsodark, page-notsodark, page-dark, page-light, page-wheat, cornsilk-dark and cornsilk-light) have a special set of styles that allow the Tabs to be positioned around the border of the TNotebook. Only the themes above have this. But PAGE will take advantage of this in the Attribute Editor.
Unfortunately, PAGE doesn’t take into consideration that the current theme might not support the positioning. So if you use, let’s say, the “alt” theme (which doesn’t have the style settings for the TNotebook tab positioning), you won’t see any changes, but it won’t cause an error.
Another big change in PAGE 8.0 is that you can now borrow existing menus from an existing project and paste them into your current project. This has been a problem for a long time and it really makes a big improvement. Once you have a “good” menubar and/or popup menu set that works for you, you can reuse them in a new project by borrowing from the project that has the nice working menu set into your current project.
One more thing I will mention about new features for PAGE is what I like to call the “Norwegian Lift”. This was a request from my friend Halvard who lives in Norway. While it is somewhat difficult to show here, I’ll try to explain the process.
Halvard was trying to create a project that has multiple frames that are stacked on top of each other, all exactly the same size and at the same x/y position. He was using, programmatically, the Tkinter widget.lift() method, which causes a widget to move on top of another widget. So in Halvard’s case, he had multiple populated frames that he could bring to the top depending on which option that the user picked from the menu (which was also a frame that was hidden by another frame).
It is a neat way to do things that need configuration or things that you want to show without having to have a separate Toplevel form and deal with all the code to hide and show things.
I’ll try to put up a blog post and provide a demo on my homepage before this article makes it into Full Circle for January (https://thedesignatedgeek.xyz ).
Until next time, as always; stay safe, healthy, positive and creative!