[Mono-winforms-list] SWF patch ( MDI interface )
Alexandre Pigolkine
pigolkine@gmx.de
Fri, 4 Apr 2003 12:54:13 +0200
Hi,
This really fixes the problem.
I wanted to discuss few things in connection to the patch:
I guess that MS SWF creates child controls somethere in between the
OnHandleCreated and OnCreateControl, i.e. child controls report
IsHandleCreated=true
on entry to the overloaded OnCreateControl in Frame-derived class. May
be
this is not so critical now, but IMO we should try to follow existing
behaviour.
The change to Handle property requires us to have some "hidden" window
to hold controls intended to be child windows until they get added to
the
real parent. Currently, Control's Window cannot be created if Parent
property
is not assigned by user application. I think we can have the "hidden"
Window as a static member of Control class and use it if Parent property
of Control object is null.
Alexandre.
> -----Original Message-----
> From: mono-winforms-list-admin@lists.ximian.com
> [mailto:mono-winforms-list-admin@lists.ximian.com] On Behalf Of
> Aleksey Ryabchuk
> Sent: Donnerstag, 3. April 2003 12:41
> To: mono-winforms-list@lists.ximian.com
> Subject: Re: [Mono-winforms-list] SWF patch ( MDI interface )
>
>
> Hi,
>
> Yes, it happens because of my changes to
> implementation of Control.Handle property. I think
> that the best way to fix this is to move these lines:
>
> // create all child windows
> IEnumerator cw = childControls.GetEnumerator();
>
> while (cw.MoveNext()) {
> Console.WriteLine ("Adding Control");
> Control control = (Control) cw.Current;
> control.CreateControl ();
> control.Show ();
> }
>
> from Control.OnHandleCreated to
> Control.OnCreateControl. It looks like it fixes the
> problem. And I also belive it is more logical place
> for creating of child controls.
>
> Regards
> Aleksey
>