VirtualTreeView: Fix "no parent window" error when VTV is in a high-dpi frame (issue #39362).

This commit is contained in:
wp_xyz 2021-09-10 14:42:10 +02:00
parent 19b127a2b1
commit eaea82f052

View File

@ -26303,7 +26303,7 @@ procedure TBaseVirtualTree.AutoScale();
var
lTextHeight: Cardinal;
begin
if (toAutoChangeScale in TreeOptions.AutoOptions) then
if HandleAllocated and (toAutoChangeScale in TreeOptions.AutoOptions) then
begin
Canvas.Font.Assign(Self.Font);
lTextHeight := Canvas.TextHeight('Tg');