Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

What actions do I need to take when user floats a Tabbed doc.

I has a single DockManager and a single DockSite.  When I float Tabbed panels the floating page's contents disappear.  When I float Tool Panels its contents remain with the floating panel. All panels contain forms which hold the application controls.

Is there some special action I need to take when a Tabbed panel is floated?

Comments

  • 6 Comments sorted by Votes Date Added
  • Strange, actually no special action required. However, what you mean saying "content"? Controls on the panel or the panel itself. What you mean "disappears", becomes invisible?
    Anyway, some test app is needed, because such issue is reported at the first time.
  • The controls (i.e. the form) does not appear on the panel, all I see is an empty panel.
    I will see what I can do to produce a minimal demo.

  • I have looked into what is happening further.  The Tab has one control, an Editor Form which holds 3 sub forms and a Panel and my own  Tab control which is used to select a sub form or panel.

    When the Tab is floated the main form remains visible but all the Editor's sub Forms / Panels become hidden.  This is also the case when docking the editor back into the Tabs Zone.

    I found that my DocEnter routine is called when the Tab is dragged away from the Tab Site (why?) so at present I am using this routine to effectively click on my own tab control to re-display the appropriate form/panel.

    This event does not get called when I drag a tab to another position on Tabbed Doc site (Why?).

    When floating a panel from a Tabbed dock site there seems to be some underlying change to the control.

    Can you throw any light on this?



  • > When the Tab is floated the main form remains visible but all the Editor's sub Forms / Panels become hidden.

    When dock panel is dragged/dropped it changes its Parent. And so, its Handle is recreated. So, all child controls recreates their Handles recursively. Depending of how you process your child forms, this may be the reason why they becomes hidden.

    As I understand you have some "Editor Form". Try to place it on some standard VCL form at run-time, using the same way you place it on the dock panel. And then, move it to another standard VCL form. You should see the same effect (inner sub forms will disappear).

    > I found that my DocEnter routine is called when the Tab is dragged away from the Tab Site (why?)

    Because the mouse is over site area.

    > This event does not get called when I drag a tab to another position on Tabbed Doc site (Why?).

    Because this is not a real drag (in Delphi sense).


  • Thanks, that explains a lot.  It means I will have to reassign ownership to some of the sub forms to maintain all the connections. 
    Is there an event I can use to detect when the form starts the float? e.g. would StartDoc be appropriate? 

  • OK, I have found the way round all this now after your explanation.  Now all seems to be working fine, thanks.
Sign In or Register to comment.