> Message: 1 > Date: Wed, 09 Apr 2008 23:35:49 +0200 > From: CubicDesign <[EMAIL PROTECTED]> > Subject: How to create MDI child forms at runtime and a > button for > each of them > To: Borland's Delphi Discussion List <[email protected]> > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=ISO-8859-1; > format=flowed > > Dear List :) > <<snip>> > Delphi's documentation doesn't tell you big deal about > Notification so I kinda got stuck.
Couple of things MdiChildren is an indexed list of Child forms and MDIChildCount tells you how many there are. But there is a better way. Make a custom childform and then descend all your child forms from that. In this custom form put some smarts to notify the Mdi form when significant events occur. Then as you make each form pass it to an Mdi routine that loads these Smart events with Mdi Event Handlers. I imagine that first you are looking at OnClose so that you can remove the tab. OnCreate is already handled by your Mdi routine. Later you add Event Handlers for OnCloseQuery OnActivate OnDeactivate OnShow the list is endless. In my custom forms I store custom menus - show that menu when the form 's OnShow Custom print routines and most anything else where I need to communicate between Master and Child Mick _______________________________________________ Delphi mailing list -> [email protected] http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

