[Gambas-user] Object.Attach Problem

Benoit Minisini gambas at ...1...
Sat Sep 16 09:06:35 CEST 2006


On Saturday 16 September 2006 08:23, R. Stormo wrote:
> Benoit Minisini wrote:
> > On Monday 11 September 2006 19:33, R. Stormo wrote:
> >> I have a prolem with Object.Attach.
> >>
> >> When this is set  Object.Attach(myform, ME, "myform")
> >>
> >> the form_resize does not work as it should
> >>
> >> sub form_resize ()
> >>
> >>   Panel1.Width = ME.Width
> >>   Print "hello"
> >>
> >> end
> >>
> >> When the object.attach is set then print hello does work but not
> >> pane1.width. When I disable the object.attach
> >>
> >> the function is working as it should. Is there a sensible answer for
> >> this?
> >>
> >>
> >> Regards Rohnny
> >>     http://forum.stormweb.no
> >
> > If your event name is "myform", then your event handler must be named
> > "myform_resize".
> >
> > Regards,
> >
> > --
> > Benoit Minisini
>
> That I understand. Ill try to explane it again.
> ----
> Form1 -
> Dim f as form
>
> f = new myform
>
> Object.Attach(myform, ME, "myform")
>
>
> Sub myform_do_calulations()
>     f.DO_my_routine()
> end sub
> ----
>
> form2 (myform)
>
> sub  form_resize()
>    Panel1.Width = ME.Width
>    Print "hello"
> end sub
>
>
> What do work in form2 is only print "hello" so it do go into the routine on
> the form, but it do not set the panel.width
>
> The reason form the object.attach is that I have other routines that shall
> be updated outside the form2 (myform). But at the same time
> sub_close , sub_resize  should work also.
>
>
> Regards Rohnny
>          http://forum.stormweb.no

Do you have arrangement constraints on Panel1 or its parents?

-- 
Benoit Minisini





More information about the User mailing list