Lazarus v0.9.30 (32 비트 컴파일러)을 사용하고 있습니다. TStringGrid의 TColumnTitle 개체와 관련된 개체에 저장된 힌트 텍스트를 표시하는 데 사용하는 다음 코드가 있습니다.TStringGrid 셀과 관련된 힌트 텍스트의 글꼴 크기를 변경하는 방법
procedure TTmMainForm.TmApplicationPropertiesShowHint
(
var HintStr: string;
var CanShow: boolean;
var HintInfo: THintInfo
);
var
aGrid : TStringGrid;
aColumnTitle : TTmColumnTitle;
aRow : integer;
aColumn : integer;
begin
aRow := 0;
aColumn := 0;
HintInfo.HintMaxWidth := 200;
HintInfo.HideTimeout := 10000;
HintInfo.HintColor := $00D7FBFA;
//Get a pointer to the current grid.
aGrid := TStringGrid(HintInfo.HintControl);
//Find out what cell the mouse is pointing at.
aGrid.MouseToCell(HintInfo.CursorPos.X, HintInfo.CursorPos.Y, aColumn, aRow);
if ((aRow = 0) and (aColumn < aGrid.ColCount)) then
begin
//Get the object associated with the column title.
aColumnTitle := TTmColumnTitle(aGrid.Objects[aColumn, aRow]);
//Define where the hint window will be displayed.
HintInfo.CursorRect := aGrid.CellRect(aColumn, aRow);
//Display the hint.
HintStr := Trim(aColumnTitle.stHint);
end; {if}
end;
나는 HintInfo 개체에 액세스 할 수 있으며이 개체를 사용하여 힌트 텍스트의 글꼴 크기를 변경하려고합니다. HintInfo 객체는 HintInfo.HintControl.Font에 대한 액세스를 제공하지만이 메서드를 사용하면 기본 TStringGrid의 모든 셀 텍스트 글꼴을 변경합니다. HintInfo 개체는 Hintinfo.HintWindowClass.Font에 대한 액세스도 제공하지만 Font.Size에 액세스 할 수 없습니다. 힌트의 글꼴 크기를 수정하는 방법이 있습니까?