Screen resolution and gadget dimensions

Just starting out? Need help? Post your questions and find answers here.
jak64
Enthusiast
Enthusiast
Posts: 639
Joined: Sat Aug 15, 2020 5:02 pm
Location: Ciboure (France)

Screen resolution and gadget dimensions

Post 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
User avatar
spikey
Enthusiast
Enthusiast
Posts: 778
Joined: Wed Sep 22, 2010 1:17 pm
Location: United Kingdom

Re: Screen resolution and gadget dimensions

Post by spikey »

User avatar
Caronte3D
Addict
Addict
Posts: 1371
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: Screen resolution and gadget dimensions

Post 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
AZJIO
Addict
Addict
Posts: 2225
Joined: Sun May 14, 2017 1:48 am

Re: Screen resolution and gadget dimensions

Post by AZJIO »

ResizeGadget
BindEvent
ResizeGadget + flag (my)

I ask Google a question in my native language and it gives the answer
Google1
Google2
jak64
Enthusiast
Enthusiast
Posts: 639
Joined: Sat Aug 15, 2020 5:02 pm
Location: Ciboure (France)

Re: Screen resolution and gadget dimensions

Post by jak64 »

Thanks spikey, Caronte3D and AZJIO, I will look at all this information.
Good evening (in France, it is 9:02 p.m.)
Fred
Administrator
Administrator
Posts: 18350
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: Screen resolution and gadget dimensions

Post by Fred »

You can also use the dialog lib which handle all resize stuff automatically
jak64
Enthusiast
Enthusiast
Posts: 639
Joined: Sat Aug 15, 2020 5:02 pm
Location: Ciboure (France)

Re: Screen resolution and gadget dimensions

Post by jak64 »

Thanks Fred,
I'm going to look at how to use the dialog library
tored
User
User
Posts: 90
Joined: Wed Feb 16, 2022 12:47 pm
Location: Sweden

Re: Screen resolution and gadget dimensions

Post 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
jak64
Enthusiast
Enthusiast
Posts: 639
Joined: Sat Aug 15, 2020 5:02 pm
Location: Ciboure (France)

Re: Screen resolution and gadget dimensions

Post by jak64 »

Hello and thank you tored
Post Reply