Potential Form Designer Position and Size Bug

Just starting out? Need help? Post your questions and find answers here.
User avatar
spikey
Enthusiast
Enthusiast
Posts: 747
Joined: Wed Sep 22, 2010 1:17 pm
Location: United Kingdom

Potential Form Designer Position and Size Bug

Post by spikey »

I seem to have found a long standing bug in the Form Designer but it seems odd that it's gone undiscovered for so long, if I'm correct...

1) Create a new form with default size (W 600 x H 400).
2) Create a gadget on the form. It doesn't appear to matter what type, I tried a button, editor and date.
3) Via the properties pane set the gadget's X to 20, Y to 20, W to 200 and H to 200.
4) Now switch to Code View. I see different values in the open procedure parameter list and in the gadget dimensions:

Code: Select all

Procedure OpenWindow_0(x = 0, y = 0, width = 480, height = 320)
  Window_0 = OpenWindow(#PB_Any, x, y, width, height, "", #PB_Window_SystemMenu)
  Date_0 = DateGadget(#PB_Any, 16, 16, 160, 160, "")
EndProcedure
5) Without switching back to design view, save the file and close it.
6) Open in a text editor outside of the IDE. I see the same values from the code listing.
7) Reopen the file and check the properties in the properties pane. I see them back to normal again.

I've tried 6.02, 6.11, 6.20 and 6.21 (x64) on Windows 11 and am seeing the same behaviour in all of them.
Can anyone else confirm/deny?
User avatar
jacdelad
Addict
Addict
Posts: 1991
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: Potential Form Designer Position and Size Bug

Post by jacdelad »

Any chance your display is set to 125% scaling?
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: 747
Joined: Wed Sep 22, 2010 1:17 pm
Location: United Kingdom

Re: Potential Form Designer Position and Size Bug

Post by spikey »

DOH! Yes, my new laptop is at 125%, I keep forgetting that!

Still a bug technically though, I think. The properties of a form should be independent of the specification of the programmer's machine.
User avatar
jacdelad
Addict
Addict
Posts: 1991
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

Re: Potential Form Designer Position and Size Bug

Post by jacdelad »

That's one of the reasons why I mostly use dialogs.
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
Post Reply