where : ibrtses delphi
Working with MDI Forms
MDI forms are windows inside windows and provide a sufficiently versatile funtionality for rather complex projects involving multiple forms.
Generting the MDI forms
At least in Delphi7, there was a mechanism to get the MDI master and child form from the files-new menu. In Delphi 2010 the process is somewhat hidden.
- generate the project with a form from the files-new menu
- the property FormStyle of the this form is set to fsMDIForm
- generate a set of new forms from the files-new menu
- the property FormStyle of the these forms is set to fsMDIChild
accessing the main form from the children
While the code from the mainform has no problems to access the child forms by including their units into the uses list, it is trickier to access the main form from the children.
- the implementation section can contain the uses main
- the Application.mainform
- the variable (T)Screen can enumerate over the forms
Working with the menu system
Upon selecting a childwindow, the menu of the mainform is replaced by the menu of the child window. This makes it somewhat tricky.
last updated subpage 1.jan.12 or perhaps later
Feedback is welcome
Copyright (99,2012) Ing.Büro R.Tschaggelar