![]() acFormHelp component |
![]() ![]() ![]() |
// let's say you would like hook the Application hints... ShowHint procedure described in the public section of TMainForm class
|
procedure TMainForm.FormCreate(Sender: TObject);
|
begin
|
Application.OnHint := ShowHint;
|
end;
|
|
procedure TMainForm.ShowHint(Sender: TObject);
|
begin
|
{ for example, status bar contains several sections to display some useful information but we would like to switch it to the simple panel mode to show second part of hint for menu items }
|
if (Length(Application.Hint) > 0) and // if Application.Hint is not empty
|
(Copy(Application.Hint, 1, 1) <> '[') then { super kludge. '[' character means that second part of hint is the context-sensitive help. The '[' sign opens the tag for text formatting. In this case we don't want to display this text in the status bar. }
|
begin
|
StatusBar.SimplePanel := True;
|
StatusBar.SimpleText := Application.Hint;
|
end
|
else StatusBar.SimplePanel := False;
|
end;
|