Recent

Author Topic: Docking windows  (Read 13484 times)

LazaruX

  • Hero Member
  • *****
  • Posts: 597
  • Lazarus original cheetah.The cheetah doesn't cheat
Re: Docking windows
« Reply #15 on: February 10, 2017, 11:18:42 am »
In the MiniIDE sample it creates forms in code. I want to create my forms in the GUI.
I just want somebody to tell me something like:

File > New > Form > DockType > DkDock
MainIDE.pas > Go to this method and do this and that. Now your form can be docked to the Main IDE.


laggyluk

  • Jr. Member
  • **
  • Posts: 69
Re: Docking windows
« Reply #16 on: February 10, 2017, 11:44:09 am »
and yet you can examine/edit the SimpleForm in designer, how queer!

remove your form from auto-create-forms in project settings and create it in DockMasterCreateControl

good luck

LazaruX

  • Hero Member
  • *****
  • Posts: 597
  • Lazarus original cheetah.The cheetah doesn't cheat
Re: Docking windows
« Reply #17 on: February 10, 2017, 11:54:56 am »
I have changed my code like this:


Code: Pascal  [Select][+][-]
  1. procedure TMainIDE.DockMasterCreateControl(Sender: TObject; aName: string; var
  2.   AControl: TControl; DoDisableAutoSizing: boolean);
  3.  
  4.   procedure CreateForm(Caption: string; NewBounds: TRect);
  5.   begin
  6.     //AControl:=CreateSimpleForm(aName,Caption,NewBounds,DoDisableAutoSizing);
  7.  
  8.   end;
  9.  
  10. begin
  11.      AControl := Form1;
  12. end;  


Form1 is the form I have created with File > New > Form.

The form can be docked, but when I try to save the layout it is not saved. The layout of MainIDE is saved, but Form1 will not be saved as docked.

 

TinyPortal © 2005-2018