home *** CD-ROM | disk | FTP | other *** search
- {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
- { Downloaded from The Coder's Knowledge Base }
- { http://www.netalive.org/ckb/ }
- {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
- { @ CKB Header Version.: 1.01 }
- { @ Category ID........: delphi_misc }
- { @ Added to database..: 9.10.98 }
- {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
- { @ Title..............: Hint in statusbar }
- { @ Original Filename..: StatusHint.txt }
- { @ Author.............: Ulli Conrad (uconrad@gmx.net) }
- { @ Description........: How to display hints in the status bar }
- { @ Tested w. Compiler.: D3 }
- { @ Submitted by.......: The CKB Crew (ckb@netalive.org) }
- {~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~}
-
-
- { How to display hints in the status bar
- By U. Conrad <uconrad@gmx.net> }
-
-
- type
- TForm1 = class(TForm)
- ...
- ...
- procedure InitForm(Sender: TObject); { Triggered on onCreate }
- procedure ShowHint(Sender: TObject); { Add this by yourself }
- end;
-
- procedure TMDIForm.InitForm(Sender: TObject);
- begin
- Application.OnHint:=ShowHint;
- { Simply add this line in the init procedure. The onHint event will alway
- be fired, even if you have turned "ShowHint" off.
- This causes the call of your own ShowHint method }
- end;
-
- procedure TMDIForm.ShowHint(Sender: TObject);
- begin
- { The ShowHint method is called if an onHint event occurs.
- You can take the applications current hint here and display it }
- Statusbar.SimpleText:=Application.Hint { if you have a simple panel bar }
- {or }
- StatusBar.Panels[0].Text := Application.Hint;
- { if you have a multi panel bar }
- end;
-
-
-
-