将hint显示在StatusBar1上
点击次数:48 次 发布日期:2008-11-09 08:37:48 作者:源代码网
|
源代码网推荐 public 源代码网推荐 procedure DisplayHint(Sender: TObject); 源代码网推荐 end; 源代码网推荐 源代码网推荐 var 源代码网推荐 源代码网推荐 Form1: TForm1; 源代码网推荐 implementation 源代码网推荐 {$R *.DFM} 源代码网推荐 源代码网推荐 { Here is the implementation of the OnHint event handler } 源代码网推荐 源代码网推荐 { It displays the application抯 current hint in the status bar } 源代码网推荐 procedure TForm1.DisplayHint(Sender: TObject); 源代码网推荐 begin 源代码网推荐 StatusBar1.SimpleText := Application.Hint; 源代码网推荐 end; 源代码网推荐 源代码网推荐 { Here is the form抯 OnCreate event handler. } 源代码网推荐 源代码网推荐 { It assign抯 the application抯 OnHint event handler at runtime } 源代码网推荐 { because the Application is not available in the Object Inspector } 源代码网推荐 { at design time } 源代码网推荐 procedure TForm1.FormCreate(Sender: TObject); 源代码网推荐 begin 源代码网推荐 Application.OnHint := DisplayHint; 源代码网推荐 end; 源代码网推荐 其实只需要将 源代码网推荐 StatusBar1.autohint:=true 源代码网推荐 即可完成 源代码网推荐 源代码网供稿. |
