Главная страница | назад





Article #17684: Viewing control hints from the status bar.

 Question and Answer Database

FAQ2684C.txt   Viewing control hints from the status bar.
Category   :VCL
Platform    :All
Product    :C++Builder  3.x

Question:
I'm tired of the little hint windows coming up when the mouse passes over all of my controls controls. Can't I send them down to the status bar.

Answer:
1) Declare a new event handler in the published section of the form's class:
    __published:
        void __fastcall ShowHint(TObject *Sender);



2) Assign the event to occur when an Application->OnHint event occurs:
    __fastcall TMainForm::TMainForm(TComponent* Owner)
        : TForm(Owner)
    {
        Application->OnHint = ShowHint;
    }

3) In the new event definition set the status bar text equal to the Application->Hint property:

    void __fastcall TMainForm::ShowHint(TObject *Sender)
    {
        StatusBar->SimpleText = Application->Hint;
    }

7/2/98 10:32:32 AM
 

Last Modified: 01-SEP-99