[Lazarus] Need help to get IDE forms object
Mattias Gaertner
nc-gaertnma at netcologne.de
Sun Jul 22 23:50:52 CEST 2012
On Fri, 20 Jul 2012 10:30:38 -0700 (PDT)
leledumbo <leledumbo_cool at yahoo.co.id> wrote:
> I need to get the object (TCustomForm) of IDE forms, namely object inspector,
> code explorer and source notebook. I need this to help a docking solution
> (kzdesktop:
> http://forum.lazarus.freepascal.org/index.php/topic,16736.0.html) to work.
> The successful way in 0.9.30.4 which is not working on 1.1 is to use
> Screen.FindForm called in main IDE's OnShow event, because at this time on
> 1.1, those forms aren't created yet. If it's already correct, then when is
> the correct time (on which event) to call Screen.FindForm? If not, what's
> the correct way?
Either implement an IDEDockMaster, see for example anchordockingdsgn
package.
Or do it manually:
Connect the event LazarusIDE.AddHandlerOnIDERestoreWindows.
In this event create the forms you need at start up:
AForm:=IDEWindowCreators.GetForm(FormName,true);
The FormName is one of 'MessagesView', 'CodeExplorerView',
'ProjectInspector', 'ObjectInspectorDlg'.
Dock them.
Mattias
More information about the Lazarus
mailing list