Recent

Author Topic: Unmovable MDIChild form?  (Read 2183 times)

panoss

  • Full Member
  • ***
  • Posts: 162
  • You only live twice
Unmovable MDIChild form?
« on: November 23, 2014, 12:24:26 am »
I have an MDIChild form. I want to make it unmovable and in the center of the MDIParent.
If I put it 's border to none, it becomes unmovable but ugly.
Is there a better way?
Windows 10 64bit, Lazarus Version 2.2.0    FPC 3.2.2.

exdatis

  • Hero Member
  • *****
  • Posts: 668
    • exdatis

panoss

  • Full Member
  • ***
  • Posts: 162
  • You only live twice
Re: Unmovable MDIChild form?
« Reply #2 on: November 27, 2014, 11:46:35 pm »
MDI forms, the solution when you have more than two forms open at the same time: (taken from here)

frmMain, default properties.

frmCustomers
BorderStyle:bsTollWindow
FormStyle:fsStayOnTop
PopupMode:pmExplicit
PopupParent:frmMain
showInTaskBar:stNever

frmCustomersAddNewEdit
BorderStyle:bsToolWindow
FormStyle:fsStayOnTop
PopupMode:pmExplicit
PopupParent:frmCustomers
showInTaskBar:stNever

Forms all auto-create (Project -> Options -> Forms).

Works fine, only problem that when all forms are open, frmCustomer can get the focus and can be closed.
But, I think, it's a minor problem in comparison with the problem solved and somehow it can be fixed.

Ok, it's a simulation of MDI, the best would be MDI forms to work properly, but and this solution comes close.
And the forms are unmovable!
(Works only in Lazarus built with Qt)
« Last Edit: November 28, 2014, 05:26:26 pm by panoss »
Windows 10 64bit, Lazarus Version 2.2.0    FPC 3.2.2.

 

TinyPortal © 2005-2018