Recent

Author Topic: Learn how to (un)dock a TPanel  (Read 2394 times)

Hansvb

  • Hero Member
  • *****
  • Posts: 793
Re: Learn how to (un)dock a TPanel
« Reply #15 on: February 23, 2025, 03:03:20 pm »
The ratio length width has no influence on dragging and docking. You can easily test if you make the panel long and narrow or put an extra dock panel on the form with a different length width ratio.

msintle

  • Sr. Member
  • ****
  • Posts: 312
Re: Learn how to (un)dock a TPanel
« Reply #16 on: February 25, 2025, 11:02:53 am »
Thanks!

Is there also a way to make it work without creating the forms dynamically upon undocking, but having the forms pre-existing (with their own captions, settings, tool-window border styling, etc.)?

Hansvb

  • Hero Member
  • *****
  • Posts: 793
Re: Learn how to (un)dock a TPanel
« Reply #17 on: February 25, 2025, 06:06:13 pm »
Hi, probably. You can probably fake docking with your own forms. But then I would rather see if anchordocking can be used in your own project.

msintle

  • Sr. Member
  • ****
  • Posts: 312
Re: Learn how to (un)dock a TPanel
« Reply #18 on: February 25, 2025, 07:22:15 pm »
Anchordocking results in the problem I had just described above.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 12161
  • FPC developer.
Re: Learn how to (un)dock a TPanel
« Reply #19 on: February 25, 2025, 07:28:15 pm »
(btw, be careful if you have tpopupmenus active on that panel)

msintle

  • Sr. Member
  • ****
  • Posts: 312
Re: Learn how to (un)dock a TPanel
« Reply #20 on: February 26, 2025, 12:49:05 am »
(btw, be careful if you have tpopupmenus active on that panel)

I do, why?

Hansvb

  • Hero Member
  • *****
  • Posts: 793
Re: Learn how to (un)dock a TPanel
« Reply #21 on: March 01, 2025, 08:59:05 am »
Can you attach an example with the Anchordocking?

Hansvb

  • Hero Member
  • *****
  • Posts: 793
Re: Learn how to (un)dock a TPanel
« Reply #22 on: March 05, 2025, 08:18:35 pm »
@msintle, The answer was right in front of me. For the time being I have given up docking but if I need it then this is the starting point:
Quote
https://wiki.freepascal.org/Anchor_Docking#Procedure_to_create_all_other_forms_by_name
and then:
Quote
You will find a code example at: components/anchordocking/miniide/miniide1.lpi

msintle

  • Sr. Member
  • ****
  • Posts: 312
Re: Learn how to (un)dock a TPanel
« Reply #23 on: March 06, 2025, 11:33:02 pm »
@msintle, The answer was right in front of me. For the time being I have given up docking but if I need it then this is the starting point:
Quote
https://wiki.freepascal.org/Anchor_Docking#Procedure_to_create_all_other_forms_by_name
and then:
Quote
You will find a code example at: components/anchordocking/miniide/miniide1.lpi

I regret the delay in getting back to you!

Insanely busy here.

Where is that code example at? Which folder is that installed in typically, can you provide an example path please?

msintle

  • Sr. Member
  • ****
  • Posts: 312
Re: Learn how to (un)dock a TPanel
« Reply #24 on: March 11, 2025, 08:15:02 pm »
I regret the delay in getting back to you.

Running this sample with both the latest trunk and our production version of Lazarus (3.4), the behavior is the same:

Trying to dock the horizontally elongated window, there's super odd behavior.

As I approach the dock target form, the window "ghost" suddenly travels back roughly it's own size horizontally.

This happens all the while the cursor is still near my intended dock destination.

From that point onwards everything is very erratic and simply unusable.

Really disappointing to see that we still don't have working docking with Lazarus, even in its own out-of-the-box samples!

 

TinyPortal © 2005-2018