1

I'm using Embarcadero Delphi 10.3 Version 26.0.36039 on Windows 10.

Step 1: place aligned Edit and Button controls on the Form. (Edit.Top = 42)

Step 2: Move the Edit down 2 points (Edit.Top = 44)

Step 3: Click on the Edit. Bam! The control has moved two points up (Edit.Top = 42)

How to fix it?

image

Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
k.e.d.r.
  • 65
  • 1
  • 6
  • http://docwiki.embarcadero.com/RADStudio/Sydney/en/Align_to_Grid and http://docwiki.embarcadero.com/RADStudio/Sydney/en/Form_Designer – David Heffernan Jul 06 '21 at 07:51
  • Thanks, David. I have already looked into these links. However, turning off the "Snap To Grid" did not help. In addition, I do not observe such a problem at another workstation (Windows 7, Embarcadero Delphi XE). – k.e.d.r. Jul 06 '21 at 10:17
  • Just clicking a control (without moving the mouse cursor a single pixel!) shouldn't move it. Do you have any extensions installed in the IDE? – Andreas Rejbrand Jul 06 '21 at 11:46
  • I remember to having seen this behavior on High-DPI systems. – Uwe Raabe Jul 06 '21 at 14:00
  • If my memory serves me correctly this has been reported as bug several years ago. And as Uwe Raabe mentioned I also believe the problem appeared on HIGH-DPI systems with OS Font scaling being set to anything but 100%. But I'm not sure of this. – SilverWarior Jul 06 '21 at 14:36
  • Yes, indeed, the High-DPI was the key. [Troubleshooting DPI Virtualization and DPI-aware applications, in Windows Vista and Windows 7 ](https://stackoverflow.com/questions/5080380/troubleshooting-dpi-virtualization-and-dpi-aware-applications-in-windows-vista) – k.e.d.r. Jul 07 '21 at 04:27

1 Answers1

1

In addition to disabling "Snap to Grid" and/or "Use Designer Guidelines" in the environment, you can also press (and hold) the Alt key while dragging the component. This will (temporarily) disable the "Snap" feature while you're dragging.

HeartWare
  • 7,464
  • 2
  • 26
  • 30
  • Yes, I have already checked this option. Unfortunately, disabling "Snap To Grid" does not solve the problem. – k.e.d.r. Jul 06 '21 at 10:17