I've now developed (or redeveloped in fact, from a CIL app that I coded) my first working GUI app created with PAGE.
I have written three other GUI apps entirely from the ground up, but this one has only taken me a few hours, rather than a few days.
The app (which is attached to this post) is for generating a nice looking comment banner, which I like to use in my code blocks. Ironically, I've had no call to use any comment banners within this app, because so much of the code was 'auto generated' by PAGE.
Again, a big and sincere thank you to everyone involved in developing PAGE and I hope that someone will find my small contribution of help, either as a working demonstration of how I used PAGE, or maybe even for generating some nice looking comment banners.
With my best regards to all who read this,
Rob
Edit to add: there are a number of things that I have questions about, which will maybe be answered as I gain experience with PAGE, but there's one thing that I can't see to work out; try as I may...
When I lock the root (AKA: top level) widget resizing, by setting the Geometry | resize width and height to no | no, and save everything (Ctrl+P and Ctrl+U), when I run the 'app', I can in fact resize the root widget.
I can, of course, edit the 'app.py' file and set top.resizable(1, 1) to top.resizable(0, 0) or even do that in the console before I 'save', and all is well; the root widget can't be resized.
But, if I then go back to PAGE and alter something, but I don't change the root Geometry settings, which are still set as I expect and in fact the root widget can't be resized while PAGE is open and the settings remain as before, when I'm finished and I exit PAGE, I see the the code line is once again top.resizable(1, 1) in the 'app.py' file: is this a bug, or am I doing something wrong please?
Good morning Rob,
First, thank you again for your kind words and the sharing of the nice app you created.
It always does our hearts good to see a user happy with their experiance with PAGE.
Now to your question about resizing the Toplevel...
When PAGE ships, the default for resizing is set to "relative" mode. That means the top.resizable() is set to 1,1.
There is an easy way to change that so PAGE will generate the statement for you. ( You should NEVER change anything in the 'app.py' file. More on that in a moment.) If you look at the PAGE menu window, you will see in the lower right of the window is the word "Relative" in a small box. That means that the GUI will be generated in the Relative mode, or so the user can resize it at run time.
If you click on that, it will change to "Absolute". That means that the user can not resize the Toplevel form. The 'app.py' file would then generate the line top.resizable(0,0).
If you want to change the default for this, you can start PAGE (without a project) and click on 'File | Preferences' which will launch the Preferences menu. At the top of the Basics tab, are three Checkbuttons. The second one has the text "Generate Python with relative placement". If you want to be in the Relative mode, it should be checked. If you want to be in the Absolute mode, then it should be un-checked. Once you have the setting the way you want, click on the green arrow in the upper right side of the window, which will save the settings. Then close PAGE and restart.
So to change the default design mode on the fly, just click on the Mode button on the Main PAGE menu. When you save your project, the mode will already be generated correctly for you.
Now about changing code in the 'app.py' file (or GUI.py file). Don't Do It. The reason I say that is if you ever need to make a change to your project, when you generate the GUI.py file, it will be re-written from scratch. EVERYTHING you have done to the GUI.py file is lost! Making changes to your support.py file is fine and that is where you should make changes. You can choose to update the support module or overwrite it when you generate it.
One more thing, please consider joining our support group on Discord. The link is https://discord.gg/EJA2kfmH . It is much easier to ask questions there and we have some sample programs written by PAGE users as well as some tips and tricks.
Thank you so much for your time and detailed explainer. There are so many options and I've really only just started to scratch the surface of PAGE, so I trust that you'll forgive my noob question, which I suspect will be answered in the very well written Tutorial: I'm on page 35 right now and will spend the next few days reading and learning.
Also, thank you for the Discord invite; I'll have peep.
You have a fab day and peaceful weekend.
My best regards to you and yours.
Rob.
Last edit: Rob 2023-05-12
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all.
I've now developed (or redeveloped in fact, from a CIL app that I coded) my first working GUI app created with PAGE.
I have written three other GUI apps entirely from the ground up, but this one has only taken me a few hours, rather than a few days.
The app (which is attached to this post) is for generating a nice looking comment banner, which I like to use in my code blocks. Ironically, I've had no call to use any comment banners within this app, because so much of the code was 'auto generated' by PAGE.
Again, a big and sincere thank you to everyone involved in developing PAGE and I hope that someone will find my small contribution of help, either as a working demonstration of how I used PAGE, or maybe even for generating some nice looking comment banners.
With my best regards to all who read this,
Rob
Edit to add: there are a number of things that I have questions about, which will maybe be answered as I gain experience with PAGE, but there's one thing that I can't see to work out; try as I may...
When I lock the root (AKA: top level) widget resizing, by setting the
Geometry | resize
width and height tono | no
, and save everything (Ctrl+P and Ctrl+U), when I run the 'app', I can in fact resize the root widget.I can, of course, edit the 'app.py' file and set
top.resizable(1, 1)
totop.resizable(0, 0)
or even do that in the console before I 'save', and all is well; the root widget can't be resized.But, if I then go back to PAGE and alter something, but I don't change the root Geometry settings, which are still set as I expect and in fact the root widget can't be resized while PAGE is open and the settings remain as before, when I'm finished and I exit PAGE, I see the the code line is once again
top.resizable(1, 1)
in the 'app.py' file: is this a bug, or am I doing something wrong please?Last edit: Rob 2023-05-12
Good morning Rob,
First, thank you again for your kind words and the sharing of the nice app you created.
It always does our hearts good to see a user happy with their experiance with PAGE.
Now to your question about resizing the Toplevel...
When PAGE ships, the default for resizing is set to "relative" mode. That means the
top.resizable()
is set to1,1
.There is an easy way to change that so PAGE will generate the statement for you. ( You should NEVER change anything in the 'app.py' file. More on that in a moment.) If you look at the PAGE menu window, you will see in the lower right of the window is the word "Relative" in a small box. That means that the GUI will be generated in the Relative mode, or so the user can resize it at run time.
If you click on that, it will change to "Absolute". That means that the user can not resize the Toplevel form. The 'app.py' file would then generate the line
top.resizable(0,0)
.If you want to change the default for this, you can start PAGE (without a project) and click on 'File | Preferences' which will launch the Preferences menu. At the top of the Basics tab, are three Checkbuttons. The second one has the text "Generate Python with relative placement". If you want to be in the Relative mode, it should be checked. If you want to be in the Absolute mode, then it should be un-checked. Once you have the setting the way you want, click on the green arrow in the upper right side of the window, which will save the settings. Then close PAGE and restart.
So to change the default design mode on the fly, just click on the Mode button on the Main PAGE menu. When you save your project, the mode will already be generated correctly for you.
Now about changing code in the 'app.py' file (or GUI.py file). Don't Do It. The reason I say that is if you ever need to make a change to your project, when you generate the GUI.py file, it will be re-written from scratch. EVERYTHING you have done to the GUI.py file is lost! Making changes to your support.py file is fine and that is where you should make changes. You can choose to update the support module or overwrite it when you generate it.
One more thing, please consider joining our support group on Discord. The link is https://discord.gg/EJA2kfmH . It is much easier to ask questions there and we have some sample programs written by PAGE users as well as some tips and tricks.
Greg
Hey Greg,
Thank you so much for your time and detailed explainer. There are so many options and I've really only just started to scratch the surface of PAGE, so I trust that you'll forgive my noob question, which I suspect will be answered in the very well written Tutorial: I'm on page 35 right now and will spend the next few days reading and learning.
Also, thank you for the Discord invite; I'll have peep.
You have a fab day and peaceful weekend.
My best regards to you and yours.
Rob.
Last edit: Rob 2023-05-12