Page 1 of 1

Potential Form Designer Position and Size Bug

Posted: Fri Jul 04, 2025 6:54 pm
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?

Re: Potential Form Designer Position and Size Bug

Posted: Fri Jul 04, 2025 7:26 pm
by jacdelad
Any chance your display is set to 125% scaling?

Re: Potential Form Designer Position and Size Bug

Posted: Fri Jul 04, 2025 8:12 pm
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.

Re: Potential Form Designer Position and Size Bug

Posted: Sat Jul 05, 2025 5:35 am
by jacdelad
That's one of the reasons why I mostly use dialogs.