Page 1 of 1

How to autosize monitor-screen?

Posted: Wednesday 6th September 2023 8:01am
by Gamba_Dance
Hi there,

since I have not found a solution so far, I would like to share a problem here. I have a small routine running on Gambas 3.12.2 that displays a menu card
with 4 different labels on one monitor. The problem occurs when the monitor resizes and the panels do not fit the new size afterwards. I have not found a
command or routine to solve this problem as there is no viable solution anywhere. Have any of you solved such a problem in the past? Help is needed.

Greetings from GD

Re: How to autosize monitor-screen?

Posted: Wednesday 6th September 2023 2:30pm
by cogier
Does the attached help?
MenuDisplay-0.0.1.tar.gz
(166.02 KiB) Downloaded 145 times

Re: How to autosize monitor-screen?

Posted: Thursday 7th September 2023 2:38pm
by Gamba_Dance
Hi cogier,

thank you and your script shows the final solution, the automatic size of the whole visible frame as it should be. You have used container elements like HBox and Panel.
You split the content into 4 png images. In my solution there is a lot of add-on programming behind the scene, for example each of the 4 labels and red stripes retrieves its own data from a database.
There are also other routines, but they are not important at this point. What I want to say is that I have to change everything that has to do with the output of the data on the screen,
because my used fields can't be converted to container elements only. That doesn't work. Either I program a conversion from the data fields into 4 separate .png as output (which could
work with your solution), or I have to change something in the programming code. Since this is internal company stuff, I can't publish the code.

Greetings GD

Re: How to autosize monitor-screen?

Posted: Friday 8th September 2023 3:37pm
by cogier
I think I better understand what you are trying to do. Have a look at this code.

Image
MenuDisplay-0.0.2.tar.gz
(166.88 KiB) Downloaded 140 times

Re: How to autosize monitor-screen?

Posted: Saturday 9th September 2023 8:56am
by Gamba_Dance
Super! :idea: Thanks much, because this solution gets the problem completely out of the way. I can now address the text fields with data from saved content and the size automatically adjusts to different monitor sizes. That's all I wanted. You've additionally added more fields to the panel than I need, but that's not a problem. I only need 2 fields per panel and can customize it that way.

Have a nice weekend 8-)
and many greetings from
GD