Delphi 12: TCombobox Arrow not drawn correctly under GDIScaling and high DPI display

42 views Asked by At

I have logged this issue with Embarcadero here, but they don't respond very quickly so I am hopeful that someone here can help.

Note: THis is only a problem on Windows 11. The Combobox arrow is displayed correctly on Windows 10.

I have 2 displays on my PC.

The primary display is 1920x1080 and scaled at 100%. I do my Delphi development on this display.

The secondary display is 3840x2160 and scaled at 200%.

  1. Start a new VCL project in Delphi 12.
  2. Drop a TCombobox on the form
  3. Go to Project -> Options.
  4. Under Application -> Manifest, set DPI Awareness to GDI Scaling
  5. Run the application
  6. The combobox looks correct on the primary display
  7. Drag the application over to the secondary display and it will appear as in the screen shot.

Screenshot of badly drawn TCombobox Arrow

Delphi 11.3 and prior did not exhibit this problem.

Does anyone have an idea of how to fix this? I have looked around in VCL.StdCtrls.pas, but have not been able to find the code that draws the dropdown arrow.

Thank you.

0

There are 0 answers