Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

TLMDDBGrid and HighDPI switching at runtime

First off, my guess by the looks of the call stack, that this error is a VCL issue, not an LMD issue.  Just thought I'd run it by you just in case.

If I drag a form that contains an TLMDDBGrid from a 4K monitor set to a scale of 100% over to another monitor with a different scale, in my case 125%, it generates an error msg during the scale change.  However, if I started on the screen set at 125% scaling, I can move it back and forth between the two monitors.  It only seems to error if I started on the 4K monitor set at 100%.  I am using an external monitor on my notebook.  The external monitor is a 4K monitor at a scale 100%.  My notebook screen is full HD at 1920x1080 but at a scale of 125%.

The error is:

Exception class ElnvalidGridOperation with message 'Grid index out of range'

Call Stack-Thread 19228
:7614c762 KERNELBASE.RaiseException + 0x62
Vcl.Grids.lnvalidOp('Grid index out of range')
Vcl.Grids.TCustomGrid.SetRowHeights(6,29)
Vcl.Grids.TCustomGrid.ChangeScale(120,96,True)
Vcl.Controls.TControl.ScaleForPPI(120)
Vcl.Controls.TWinControl.ScaleForPPI(120)
Vcl.Controls.TWinControl.ScaleControlsForDpi(120)
Vcl.Controls.TWinControl.ScaleForPPI(120)
Vcl.Controls.TWinControl.ScaleControlsForDpi(120)
Vcl.Forms.TCustomForm.ScaleForPPIRect(120,S19E70C)
Vcl.Forms.TCustomForm.WMDpiChanged((736, 0,120,120, 0, S19EBF4, 0))
Vcl.Controls.TControl.WndProc((736, 7864440,1698804, 0,120,120, 0, 60404, 25, 0, 0, 0, 0))
Vcl.Controls.TWinControl.WndProc((736, 7864440,1698804, 0,120,120, 0, 60404, 25, 0, 0, 0, 0))
Vcl.Forms.TCustomForm.WndProc((736, 7864440,1698804, 0,120,120, 0, 60404, 25, 0, 0, 0, 0))
Vcl.Controls.TWinControl.MainWndProc(???)
System.Classes.StdWndProc(3213478,736,7864440,1698804)
:0068cc2e TCustomForm.ScaleForPPIRect + S52
Vcl.Controls.TWinControl.DefaultHandler(???)

LMD Toosl 2019.4
Delphi Rio 10.3.1

Comments

Sign In or Register to comment.