?? 小技巧 (2001年5月30日).txt
字號:
小技巧 (2001年5月30日)
網友更新 分類:控件使用 作者:閻磊 推薦:yanlei 閱讀次數:491
(http://www.codesky.net)
--------------------------------------------------------------------------------
我們為了將hint顯示在StatusBar1上需要如下方法
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
即可完成
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -