本例相关图片:
unit Unit1;
interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ImgList;
type TForm1 = class(TForm) BalloonHint1: TBalloonHint;
Button1: TButton;
Edit1: TEdit;
ImageList1: TImageList;
procedure FormCreate(Sender: TObject);
end;
var Form1: TForm1;
implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);
begin Button1.CustomHint := BalloonHint1;
Edit1.CustomHint := BalloonHint1;
BalloonHint1.Images := ImageList1;
Button1.ShowHint := True;
Edit1.ShowHint := True;
Button1.Hint := '提示:|这是 Button1 的 Hint|0';
{标题|内容|ImageList 中的图像序号} Edit1.Hint := '敬告:|这是 Edit1 的 Hint|1';
end;
end.