Board index » delphi » Dragging contents of MDI child to dock in tabbed page control on main form

Dragging contents of MDI child to dock in tabbed page control on main form

Hi.

I want to drag a visual component (eg a memo or a treeview) from an MDI
child into a tabbed page control (say on the master form, but generally
to anywhere) and then be able to drag it out again to a child windo
again later. Since the component in the child takes up the whole real
estate on the child form, Delphi will need to kill the old child window,
and open a new one again when the component is dragged out of the page
control.

How to do? How best to do?

Thanks,

LM.

 

Re:Dragging contents of MDI child to dock in tabbed page control on main form


Quote
In article <376B9360.E1383...@hotmail.com>, Lauchlan Mackinnon wrote:
> I want to drag a visual component (eg a memo or a treeview) from an MDI
> child into a tabbed page control (say on the master form, but generally
> to anywhere) and then be able to drag it out again to a child windo
> again later. Since the component in the child takes up the whole real
> estate on the child form, Delphi will need to kill the old child window,
> and open a new one again when the component is dragged out of the page
> control.

I cannot give you a detailed recipe here since my experience with this
drag&dock stuff is severely limited. What i found is: if you assign the
MDI child form class to the FloatingDockSiteClass property of the control
you want to drag it will materialize on a new MDI child if you drag it out
of the old docksite. To get this to work correctly one probably needs to
play with the divers drag&dock event handlers (e.g. the docksite child
will not self-immolate if you drag the control out of it again, this needs
to be managed in code in an OnEndDock handler, i assume).

Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitly requested!

Re:Dragging contents of MDI child to dock in tabbed page control on main form


Quote
> I cannot give you a detailed recipe here since my experience with this
> drag&dock stuff is severely limited. What i found is: if you assign the
> MDI child form class to the FloatingDockSiteClass property of the control
> you want to drag it will materialize on a new MDI child if you drag it out
> of the old docksite. To get this to work correctly one probably needs to
> play with the divers drag&dock event handlers (e.g. the docksite child
> will not self-immolate if you drag the control out of it again, this needs
> to be managed in code in an OnEndDock handler, i assume).

Thanks, that's certainly got me on the right track. Do you have any ideas
about a good source for details? I don't recall seeing anything in the main
third party books, and the online help isn't much good - it just tells you
what the properties etc are without much input into how to use them.

Thanks again,

LM.

Re:Dragging contents of MDI child to dock in tabbed page control on main form


Quote
In article <376DF338.79883...@hotmail.com>, Lauchlan Mackinnon wrote:
> Do you have any ideas
> about a good source for details? I don't recall seeing anything in the main
> third party books, and the online help isn't much good - it just tells you
> what the properties etc are without much input into how to use them.

Sorry, I did not look at any of the D4 books and the topic has not been of
enough interest for me to follow it up myself. As usual the VCL source is the
ultimate documentation but it is not an easy read <g>.

Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitly requested!

Other Threads