在 Windows 10 上的 Delphi 10.4.2 32 位 VCL 应用程序中,我正在尝试自定义提示 Font.Size
:
type
TExHint = class(THintWindow)
constructor Create(AOwner: TComponent); override;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
constructor TExHint.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
with Canvas.Font do
begin
//Name := 'Verdana';
Size := 15;
//Style := [fsBold, fsItalic];
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
HintWindowClass := TExHint;
end;
但它不起作用。
如何自定义应用程序的提示 Font.Size
?
最佳答案
比这容易得多。
只需设置 Screen.HintFont
属性:
procedure TForm.FormCreate(Sender: TObject);
begin
Screen.HintFont.Size := 20;
end;
甚至
或
关于delphi - 如何自定义Hint Font.Size?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68323131/