First of all let me thank Greg for a very handy GUI drag and drop system. I am not an experienced Python programmer, but I find it saves an enormous amount of time in forms design.
I have a small problem. I am using Theme page-wheat and have dropped 4 TButtons on my top level form, all of which show on my program when I run it. However, there are no borders around the buttons and they look stark with just names eg Add. Edit. etc with no borders. I can't find anything in Attributes window.
Can some one please help me?
Neil
First, thank you for the kind words, but Don Rozenberg is the one that you should be thanking.
I just help out here and there.
Are you running on a Mac? Windows? Linux?
Actually, you can have the TButtons two ways. One with borders that "kinda" look like a regular button and then there is the Toolbutton style. That one has no borders. You can set it in the Style attribute by typing "Toolbutton". Various themes have various differences between the widgets.
I attached a zip file that you can see how to change the style using Themes.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2024-11-20
Thanks for your reply Gregg. I am using a Mac Mini M1.
On my computer, the default setting seems to be with no borders, because the Attribute Theme is blank and the result is no border. And when I add Toolbutton to the attribute, I still get no border. I am not likely to ever use no borders on my buttons, so where do I go from here?
I am attaching an image from my .tcl file where you can clearly see borders which disappear when the Python code is generated.
Yopur help would be appreciated.
One other thought...
Does the border show up when you use the mouse over the button(s), when you are running it in Python?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2024-11-20
Hi Greg.
No, the Border doesn't show up when I run it in Python and hover over the button. It does however show a shadow of where the wholw button is.
I will change themes now.
Neil
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2024-11-20
Hi Greg
Yes, it works perfectly with cornsilk-light theme. All button borders are there.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2024-11-20
Greg, just one small thing. Every time I save the tcl file and then reload it, it reloads into a tabbed form and when I separate them to get the actual form, I have lost my overall size settings and I have to reset them. Is there a setting that I can fix the size in the tcl file?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's strange that Cornsilk-light works and page-wheat doesn't.
I'll have to dig into the theme file.
As to the tcl file reloading into a tabbed form, I'm not sure what you are referring to. PAGE doesn't use a tabbed form.
Yes, if you are VERY careful you could edit the .tcl file.
You should look for a line like this...
wm geometry $top 412x250+1045+420
Be sure that you are not using something that will reformat the file.
Anyway, the part of the line after the "$top" is
width, height, Screen X, Screen Y
Make sure you duplicate it correctly.
You should actually open the project in PAGE, then move and resize it. Then save the file and exit PAGE. When you open PAGE to work on it again, be sure to return to that project folder and you can use something like...
page myproject
It's always best not to hand edit the .tcl file.
Greg
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2024-11-20
Thanks. I use MS Code to launch Page and then Open/myFile. It works fine, but this is how it loads the Tree/Widgets/form (tabbed)
Using MS Code to start PAGE is not how it's intended to run.
Always move to your project folder, then open a terminal and start PAGE from the command line.
There is a part of me that thinks that might be part of your problem.
Greg
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2024-11-20
OK. So I ran Page from the terminal and openedmy file from the Page Menu. The result was the same. It opened a blank format in tabbed form.
Because my Page Directory is different to my Page Projects Directory, I am unable to open my project file in my terminal in one command.
Unfortunately, I am not a programmer. I am an 89 year old hobbyist who is trying to learn Python on a work-and-learn basis (being only interested in DB programming) in order to keep my brain active!
I guess I will just have to resize my form every time. Not serious.
Thank you very much for your help Greg.
Best regards
Neil
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok. I don't have access to a Mac and Don does all the testing for Mac since he shares one with his wife.
However, Mac is very close to "standard" linux (which I run). I have my PAGE distribution in the Downloads folder. I use an alias in the .bash_aliases file and it looks like this...
Now I understand that for a Mac, there isn't a "standard" bash file, however I did a search on the Internet and came up with a number of links. This is the one I decided to look at...
So, it appears that you should be able to create an alias file.
One of the users there suggested you create a .zshrc file and add it there.
Be sure to do a "source ~/.zshrc" or "source ~/.bash_profile" or which profile you entered the above example line (changing the path). This needs to be done so the existing terminal will be updated, or you can just close that terminal and open a new one.
Also when starting PAGE from the terminal command line, you can start PAGE and load the project name all on the same line. For example, my project is called "button1".tcl". Now at the command line, type...
page button1
Assuming you are in the correct folder, PAGE should start then automatically load the button1.tcl file for you.
This saves a lot of clicking.
I'll have Don check using the page-wheat theme on Mac. Since cornsilk-light does work, it's likely do to something on Mac, but I'll double check it on my side.
Greg
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2024-11-21
Hi Greg
Thanks for the above. I opened my Books Library.tcl in Page from the command line in Terminal. The result was exactly the same screen as if I had opened it in MS Code. Just thought you may like to know. Attached are the images.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2024-11-21
Of course this is good news for me as , because I am not a programmer and thus find terminal work more difficult, it is easier and much quicker for me to just use MS Code.
Again Greg, thank you very much. You have spent a lot of time on my problem and I apprecate it greatly.
Neil
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2024-11-22
Hi Greg
I downloade the new themes file above and changed the thene to page-wheat. It worked perfectly on the tcl module. When I generated the Python GUI and saved it, and reran the app I am developing, the colours were still Cornsilk-light on the app that ran.
I go back into the tcl file through Page and Ran the GUI file within the Page app. There seems to be a strange error message. Have a look at this.
The error message seems to refer to the fact that the program can't find the theme 'page-wheat.tcl' in the local themes folder.
Plus the error comes just as the GUI program is trying to locate the theme that was used during the creation of the GUI.
So you first should look at the __location variable. Then make sure that that path has a themes folder and that page-wheat.tcl is there.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2024-11-22
Soory Greg, but maybe I didn't do it right. When you sent me the revised themes data, I renamed the themes folder in my Project file, and saved the new themes folder there, but I didn't so the same in the page folder. I have now done that and loaded my project's tcl into page, but got an error while it was loaded.
First, to get PAGE back working go into the PAGE distribution folder and make sure there is a themes folder. Inside that folder needs to be a file called themes_list.tcl. PAGE uses this to know what themes it should read.
Next, back in your project folder, you also need a themes folder. This is where the python program will look for the themes meant for your project. This one does not need a themes_list.tcl file. Usually you will have whatever theme you designed with back in PAGE.
In your case, you need to have (at least) page-wheat.tcl in the themes folder.
Greg
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2024-11-22
I've done that now and I'm sorry to say that there are no borders in the buttons when I run my project with the new files. I must say that I really like the page-wheat background colours shown in the project tcl file. and I look forward to being able to use it. In the meanwhile I am reverting to the Corn-silk theme.
Thanks again for your help.
Neil
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
First of all let me thank Greg for a very handy GUI drag and drop system. I am not an experienced Python programmer, but I find it saves an enormous amount of time in forms design.
I have a small problem. I am using Theme page-wheat and have dropped 4 TButtons on my top level form, all of which show on my program when I run it. However, there are no borders around the buttons and they look stark with just names eg Add. Edit. etc with no borders. I can't find anything in Attributes window.
Can some one please help me?
Neil
First, thank you for the kind words, but Don Rozenberg is the one that you should be thanking.
I just help out here and there.
Are you running on a Mac? Windows? Linux?
Actually, you can have the TButtons two ways. One with borders that "kinda" look like a regular button and then there is the Toolbutton style. That one has no borders. You can set it in the Style attribute by typing "Toolbutton". Various themes have various differences between the widgets.
I attached a zip file that you can see how to change the style using Themes.
Let me know if this helped.
Greg
Thanks for your reply Gregg. I am using a Mac Mini M1.
On my computer, the default setting seems to be with no borders, because the Attribute Theme is blank and the result is no border. And when I add Toolbutton to the attribute, I still get no border. I am not likely to ever use no borders on my buttons, so where do I go from here?
I am attaching an image from my .tcl file where you can clearly see borders which disappear when the Python code is generated.
Yopur help would be appreciated.
But it only happens when you run the program in Python, right?
Hmmm. Have you tried different themes?
Could you try the cornsilk-light theme? Does it still cause problems?
Greg
One other thought...
Does the border show up when you use the mouse over the button(s), when you are running it in Python?
Hi Greg.
No, the Border doesn't show up when I run it in Python and hover over the button. It does however show a shadow of where the wholw button is.
I will change themes now.
Neil
Hi Greg
Yes, it works perfectly with cornsilk-light theme. All button borders are there.
Greg, just one small thing. Every time I save the tcl file and then reload it, it reloads into a tabbed form and when I separate them to get the actual form, I have lost my overall size settings and I have to reset them. Is there a setting that I can fix the size in the tcl file?
It's strange that Cornsilk-light works and page-wheat doesn't.
I'll have to dig into the theme file.
As to the tcl file reloading into a tabbed form, I'm not sure what you are referring to. PAGE doesn't use a tabbed form.
Yes, if you are VERY careful you could edit the .tcl file.
You should look for a line like this...
Be sure that you are not using something that will reformat the file.
Anyway, the part of the line after the "$top" is
width, height, Screen X, Screen Y
Make sure you duplicate it correctly.
You should actually open the project in PAGE, then move and resize it. Then save the file and exit PAGE. When you open PAGE to work on it again, be sure to return to that project folder and you can use something like...
page myproject
It's always best not to hand edit the .tcl file.
Greg
Thanks. I use MS Code to launch Page and then Open/myFile. It works fine, but this is how it loads the Tree/Widgets/form (tabbed)
And if I separate the tabs then I get this. So I have to resize it.
Using MS Code to start PAGE is not how it's intended to run.
Always move to your project folder, then open a terminal and start PAGE from the command line.
There is a part of me that thinks that might be part of your problem.
Greg
OK. So I ran Page from the terminal and openedmy file from the Page Menu. The result was the same. It opened a blank format in tabbed form.
Because my Page Directory is different to my Page Projects Directory, I am unable to open my project file in my terminal in one command.
Unfortunately, I am not a programmer. I am an 89 year old hobbyist who is trying to learn Python on a work-and-learn basis (being only interested in DB programming) in order to keep my brain active!
I guess I will just have to resize my form every time. Not serious.
Thank you very much for your help Greg.
Best regards
Neil
Ok. I don't have access to a Mac and Don does all the testing for Mac since he shares one with his wife.
However, Mac is very close to "standard" linux (which I run). I have my PAGE distribution in the Downloads folder. I use an alias in the .bash_aliases file and it looks like this...
Now I understand that for a Mac, there isn't a "standard" bash file, however I did a search on the Internet and came up with a number of links. This is the one I decided to look at...
Here
So, it appears that you should be able to create an alias file.
One of the users there suggested you create a .zshrc file and add it there.
Be sure to do a "source ~/.zshrc" or "source ~/.bash_profile" or which profile you entered the above example line (changing the path). This needs to be done so the existing terminal will be updated, or you can just close that terminal and open a new one.
Also when starting PAGE from the terminal command line, you can start PAGE and load the project name all on the same line. For example, my project is called "button1".tcl". Now at the command line, type...
Assuming you are in the correct folder, PAGE should start then automatically load the button1.tcl file for you.
This saves a lot of clicking.
I'll have Don check using the page-wheat theme on Mac. Since cornsilk-light does work, it's likely do to something on Mac, but I'll double check it on my side.
Greg
Hi Greg
Thanks for the above. I opened my Books Library.tcl in Page from the command line in Terminal. The result was exactly the same screen as if I had opened it in MS Code. Just thought you may like to know. Attached are the images.
here is the result
Of course this is good news for me as , because I am not a programmer and thus find terminal work more difficult, it is easier and much quicker for me to just use MS Code.
Again Greg, thank you very much. You have spent a lot of time on my problem and I apprecate it greatly.
Neil
I wish I had good news for you this morning, but status is about the same.
Could you try the clam theme for me please. That is the theme that all of the PAGE themes are based on.
Thank you again.
Good morning Neil.
I've created a test program that might help us figure out why page-wheat doesn't work for you.
In addition, I've included in the test program, a newer version of page-wheat that is due to release in PAGE 8.1.
Please download it and run it. Select page-wheat from the combobox and let me know if it works better than the original.
Thank you in advance,
Greg
Hi Greg
I downloade the new themes file above and changed the thene to page-wheat. It worked perfectly on the tcl module. When I generated the Python GUI and saved it, and reran the app I am developing, the colours were still Cornsilk-light on the app that ran.
I go back into the tcl file through Page and Ran the GUI file within the Page app. There seems to be a strange error message. Have a look at this.
Sorry I meant to add that the new GUI file was never saved as a py but saved ok as a tcl.
The error message seems to refer to the fact that the program can't find the theme 'page-wheat.tcl' in the local themes folder.
Plus the error comes just as the GUI program is trying to locate the theme that was used during the creation of the GUI.
So you first should look at the __location variable. Then make sure that that path has a themes folder and that page-wheat.tcl is there.
Soory Greg, but maybe I didn't do it right. When you sent me the revised themes data, I renamed the themes folder in my Project file, and saved the new themes folder there, but I didn't so the same in the page folder. I have now done that and loaded my project's tcl into page, but got an error while it was loaded.
Ok. I guess I didn't make the instructions clear.
First, to get PAGE back working go into the PAGE distribution folder and make sure there is a themes folder. Inside that folder needs to be a file called themes_list.tcl. PAGE uses this to know what themes it should read.
Next, back in your project folder, you also need a themes folder. This is where the python program will look for the themes meant for your project. This one does not need a themes_list.tcl file. Usually you will have whatever theme you designed with back in PAGE.
In your case, you need to have (at least) page-wheat.tcl in the themes folder.
Greg
I've done that now and I'm sorry to say that there are no borders in the buttons when I run my project with the new files. I must say that I really like the page-wheat background colours shown in the project tcl file. and I look forward to being able to use it. In the meanwhile I am reverting to the Corn-silk theme.
Thanks again for your help.
Neil