Page 1 of 1

Screen resolution and gadget dimensions

Posted: Mon Aug 19, 2024 4:08 pm
by jak64
Hello everyone...
A question that bothers me:

When I write a program in Purebasic, I arrange my gadgets (and their size) according to my screen resolution (at home, 1366x768 pixels).

If I run my program on another computer which has a higher resolution, for example 1920x1080, and I put it full screen, my program is displayed but in small...

Is there a solution so that gadgets are automatically resized and repositioned to display on the entire computer at a higher resolution (like on OpenWindowedScreen windows)?

I think not and that I must, myself in my program, resize and reposition my gadgets, fonts, etc., according to the resolution found on the new computer, also taking into account the enlargement factor.

Thanks to you

Re: Screen resolution and gadget dimensions

Posted: Mon Aug 19, 2024 5:49 pm
by spikey

Re: Screen resolution and gadget dimensions

Posted: Mon Aug 19, 2024 5:49 pm
by Caronte3D
I use IceDesign, it's not free but I think it's worth the price and you help to a member of this community.
It can do what you want (automatically) and much more.

https://www.purebasic.fr/english/viewtopic.php?t=74711

Re: Screen resolution and gadget dimensions

Posted: Mon Aug 19, 2024 7:31 pm
by AZJIO
ResizeGadget
BindEvent
ResizeGadget + flag (my)

I ask Google a question in my native language and it gives the answer
Google1
Google2

Re: Screen resolution and gadget dimensions

Posted: Mon Aug 19, 2024 8:02 pm
by jak64
Thanks spikey, Caronte3D and AZJIO, I will look at all this information.
Good evening (in France, it is 9:02 p.m.)

Re: Screen resolution and gadget dimensions

Posted: Tue Aug 20, 2024 6:34 am
by Fred
You can also use the dialog lib which handle all resize stuff automatically

Re: Screen resolution and gadget dimensions

Posted: Tue Aug 20, 2024 7:38 am
by jak64
Thanks Fred,
I'm going to look at how to use the dialog library

Re: Screen resolution and gadget dimensions

Posted: Tue Aug 20, 2024 8:00 am
by tored
Here is a good thread with three examples from Danilo for using the dialog library. The third example shows how to handle a gadget manually outside the dialog library by using container


https://www.purebasic.fr/english/viewtopic.php?t=79177

Re: Screen resolution and gadget dimensions

Posted: Tue Aug 20, 2024 8:11 am
by jak64
Hello and thank you tored