FadeOutProxyComponent suggestion


#1

Hi,

In order to be able to use fadeOutComponent method on a Component added to the desktop, it would be nice to replace this code:

comp->getParentComponent()->addAndMakeVisible (this);

by this one:

if (comp->getParentComponent())
comp->getParentComponent()->addAndMakeVisible (this);
else
{
addToDesktop (0);
setAlwaysOnTop (comp->isAlwaysOnTop());
setVisible (true);
}

It woked fine for me but it may need some improvements.

I hope this can help.

Regards,
Fabrice


#2

I don’t think that’s very wise - you’re suddenly replacing a window with a different one, it’s bound to flicker or go wrong somehow. The correct way to do this would be to use the normal windowing methods for adjusting the window’s alpha level, but I’ve not implemented those yet.


#3

I guess you’re right. What I can tell is that it does the trick on a small dialog on Windows XP. I will keep this patch for my own use untill the “normal windowing methods for adjusting the window’s alpha level” is implemented and available.

Thank you for the feedback and the great work.
Fabrice


#4