This site hosted by Free.ProHosting.com
Google

How can I show menu hints in the StatusBar?

Applies To: C++Builder 1 or higher
Category: Knowledge Base

 
 1.
  Start a new project using File | New Application.
 
 2.
  Add a Menu. Insert some sample items and edit their
      respective Hint.
 
 3.
  Add a StatusBar. Set SimplePanel to true.
 
 4.
  Edit the header file your form and insert:
 
private:
    void __fastcall DisplayHint(TObject *);
 
 5.
  Double-click the OnCreate event of your form:
 
void __fastcall TForm1::FormCreate(TObject *Sender)
{
    Application->OnHint = DisplayHint;
    Application->ShowHint = true;
}
 
 6.
  Insert in your source code:
 
void __fastcall TForm1::DisplayHint(TObject *Sender)
{
    StatusBar1->SimpleText = Application->Hint;
}
 
Hints
· If you're using C++Builder 4 or greater, you don't need these steps. Simply set the AutoHint property of your StatusBar to true.

C++Builder Developer's Network
Copyright © Yoto Yotov