Palette hide

Started by Fred Tomke, March 04, 2009, 05:35:14 AM

Previous topic - Next topic

Fred Tomke

Hello,

I have a palette form. When I click right on its background, a context menu opens and I can choose the second menuitem. I believe it is called "Hide" in the English releases, in German it is called "Ausblenden". In this case the form disappears. After that I call different methods:

Analysis:
(dcl_Form_IsVisible MyPalette) returns nil: that's obviously right, I cannot see the form anymore.
(dcl_Form_IsActive MyPalette) returns T: that must be correct, too, because using (dcl_form_show MyPalette) has no effect.

But how can I make it visible again?
(dcl_form_show MyPalette) has no effect, as I already noticed
(dcl_form_hide MyPalette nil) has obviously no effect, at least I don't see the result

I have to close the invisible form at first and then I have to show it again, then I see the form. But the OnInitialize is called again. (dcl_form_close MyPalette) and then (dcl_form_show MyPalette) I hoped to avoid that.

How to get noticed, when the user hides the palette using the context menuitem?
The OnClose event will be triggered on (dcl_form_close MyPalette), but not when making the form invisible.
There's no event OnHide.

To close the form using the context menu is not the problem. But unforunately, it isn't closed it is hidden. But in a way (dcl_form_hide ... nil) has no effect. Will closing the form programmatically and showing again the only solution?

I hope it was understandable.  :)

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

owenwengerd

This should now be fixed for the next build so that selecting 'Hide' on the menu closes the form and triggers OnClose.  I designed OpenDCL's palette and control bars such that there is no "hidden" state. It is either shown or closed, and "hiding" the form just closes it. Note however that the form's properties maintain state between invocations, so it's not necessary to reinitialize the form every time, except for things that are not stored in properties.