Hello,
Version 9.1.4.7, Delphi 10.2.3.
This code has been working for a few years. Not sure when this began. Testing today exposed it.
Dynamically creating a TAdvStringGrid.
When I try to set anything having to do with the font, failure.
Here is the calling code:
procedure TGraphicExcelGrid.SetStringGridProperties;
begin
if not Assigned(grid) then //might be a reload from a cancel in the animation dialog
Exit;
grid.Color:=bgColor;
grid.Font.Name:=fontName;
// grid.Font.Size:=textSize;
// grid.Font.Style:=textStyle;
// grid.Font.Color:=fgColor;
// grid.Font.Charset:=charSet;
end;
Here is where it fails, line after inherited.
procedure TAdvDateTimePicker.CreateWnd;
var
oldKind: TAdvDateTimeKind;
begin
inherited;
FOldCheck := Checked;
oldKind := FKind;
FKind := dkDate;
Kind := oldKind;
if not ParentFont and (LabelCaption <> '') and not (csDesigning in ComponentState) then
begin
FLblUpdate := true;
LabelFont.Height := Round(FLblFntHeight * CalculateDPIScale(Self));
FLblUpdate := false;
end;
if Assigned(FLabel) then
UpdateLabelPos;
end;
Here is the stack trace.
Ideas?
Thanks,
Mark