Board index » cppbuilder » ErrorMessage: Cannot change Visible in OnShow or OnHide

ErrorMessage: Cannot change Visible in OnShow or OnHide

Hi All

When i double-click a file my applications displays the error message:

(X)  Cannot change Visible in OnShow or OnHide

1) My application a panel to display a Media.

Does this mean that i cannot change the value of the Panel's Visible
property
    in the event handler associate with the events OnShow and OnHide?

2) I have replaced  the code of the event handler for OnShow (I don't use
OnHide)
    on the new vesion for the corresponding code (same event handler) of an
earlier version.
   The earlier version does not displays the error message.
   But the new vesion still displays the above error message even with the
old
   event handler. I am looking at the wrong place?

Regards

 

Re:ErrorMessage: Cannot change Visible in OnShow or OnHide


Quote
"rodolfo frino" <rodolfofr...@one.net.au> wrote:
> (X)  Cannot change Visible in OnShow or OnHide

This happens if you do something like this:

void TForm1::FormShow(TObject* Sender)
{
Visible = false;

Quote
}

You could also trigger this indirectly of course: Hide() for example.

HTH,

Micha.

Other Threads