Recent

Author Topic: Anchordocking - window problem  (Read 341 times)

janhsh

  • New Member
  • *
  • Posts: 20
    • http://www.houbart.be
Anchordocking - window problem
« on: February 10, 2026, 09:11:50 am »

Hello, I'm having a problem with anchordocking.
I want to create an application that allows me to dock certain windows. When the application starts, the windows should be invisible, and when I open them, they should appear in the dock in their designated location.

So far, it's been a struggle, but thanks to AI, I have a semi-functional solution.

My problem is that when I click the X on the window's header, it closes. But when I reopen it, it loses its position in the dock. I just want it to become invisible but remain in the dock. Exiting the dock is done exclusively by dragging and dropping.

Does anyone have a solution to prevent this window from closing and removing it from the dock?

Thanks in advance

Bonjour.,
Je rencontre un problème avec anchordocking
Je voudrai créer une application qui permet d'ancrer certaines fenêtres. Mais au demarage de l'application les les fenêtre doivent être invisible et quand je les ouvre, prendre place dans le dock à l'emplacement prévu.

Jusque là, ça a été laborieux mais grâce à l'ia j'ai une solution semi fonctionnelle.

Min problème est que lorsque mon clique sur le X sur le header de la fenêtre, celle-ci se ferme. Mais à la réouverture elle perd son emplacement dans le dock. Moi je voudrai juste qu'elle devient invisible mais reste dans le dock. La sortie du dock se faisant exclusivement par drag-off.

Quelqu'un aurait-il une solution pour empêcher cette fermeture de fenêtre de la retirer du dock ?

Merci d'avance.





Zvoni

  • Hero Member
  • *****
  • Posts: 3315
Re: Anchordocking - window problem
« Reply #1 on: February 10, 2026, 10:41:04 am »

My problem is that when I click the X on the window's header, it closes. But when I reopen it, it loses its position in the dock. I just want it to become invisible but remain in the dock. Exiting the dock is done exclusively by dragging and dropping.

Does anyone have a solution to prevent this window from closing and removing it from the dock?


In the OnClose-Event just assign caHide to CloseAction

Code: Pascal  [Select][+][-]
  1. procedure TFormEmployees.FormClose(Sender: TObject;
  2.   var CloseAction: TCloseAction);
  3. begin
  4.   CloseAction:=caHide;
  5. end;    
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

 

TinyPortal © 2005-2018