📄 小技巧 (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 + -