Re:ShowHint: Hints only on the main form?
Hello Mustafa
while your second form is active you must the Application->OnHint-method
redirect to your second form. See the following example.
1. Make a pointer to save the old OnHint-method
======================================
class TFormTest: public TForm
{
__published:
.....
private:
TNotifyEvent OnHintOld;
public:
2. By opening the window save the old OnHint-method and set the new
OnHint-method
============================================
void __fastcall TFormTest::FormShow(TObject *Sender)
{
OnHintOld = Application->OnHint; // save old method
Application->OnHint = ShowHint; // set new method
3. By closing the window set back the old OnHint-method
============================================
void __fastcall TFormTest::FormClose(TObject *Sender, TCloseAction &Action)
{
Application->OnHint = OnHintOld; // reset old method
4. On the ShowHint()-method in your second form assign the help text to your
second statusbar
void __fastcall TFormTest::ShowHint(TObject *Sender)
{
StatusBar1->SimpleText = Application->Hint;
I hope it's a help for you
Josef Halder
rhal...@w-4.de
----------------------------------------------------------------------------
-------------
Mustafa Cebi schrieb in Nachricht <3765046C.455D...@weilberg.de>...
Quote
>hi,
>I have in a main form a statusbar1 (ParentShowHint and ShowHint = true),
>and in a second form a statusbar2 (ShowHint=true). The helpcontext from
>the button on the second form is shown in the statusbar1, not in
>statusbar2. What must I do to show this in statusbar2?
>thanks, Mustafa Sami Cebi