screenresolution

Just starting out? Need help? Post your questions and find answers here.
ludoke
Enthusiast
Enthusiast
Posts: 155
Joined: Fri Jul 08, 2016 5:35 pm
Location: Essen (Belgium)

screenresolution

Post by ludoke »

I have a screen with many gadgets and a drawing on canvas gadget created for a resolution of 1360x768, how can I rescale this to a resolution of 1920x1080.
Do I have to calculate the size, position and text for each gadget, or is there an easier way?
User avatar
jacdelad
Addict
Addict
Posts: 1991
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: screenresolution

Post by jacdelad »

If you use the dialog library, the gadgets can resize themselves automatically based on the size of the window.
Last edited by jacdelad on Mon Aug 19, 2024 10:38 pm, edited 1 time in total.
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
User avatar
spikey
Enthusiast
Enthusiast
Posts: 750
Joined: Wed Sep 22, 2010 1:17 pm
Location: United Kingdom

Re: screenresolution

Post by spikey »

ludoke wrote: Tue Jun 18, 2024 9:20 am Do I have to calculate the size, position and text for each gadget
Yes.
ludoke wrote: Tue Jun 18, 2024 9:20 am or is there an easier way?
There are other ways to do it but they don't necessarily merit the adjective easier unfortunately. There are a couple of examples of resize handlers elsewhere on the forum, see https://www.purebasic.fr/english/viewtopic.php?t=82349 or https://www.purebasic.fr/english/viewto ... 0&p=544901, for example.

The dialog library creates user interfaces with automatic layout characteristics, see https://www.purebasic.com/documentation ... index.html. However, converting a large interface over from the window library to the dialog library instead is not a trivial task.
User avatar
mk-soft
Always Here
Always Here
Posts: 6202
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: screenresolution

Post by mk-soft »

Module from me with font and image scaling ...

Link: Module ScaleGadgets
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
ludoke
Enthusiast
Enthusiast
Posts: 155
Joined: Fri Jul 08, 2016 5:35 pm
Location: Essen (Belgium)

Re: screenresolution

Post by ludoke »

thanks,
it seems more complicated than I thought.
Maybe better to make 2 layout for 2 screen resolutions
Post Reply