[Gambas-user] Reparenting a form on a tabstrip....
Benoit Minisini
gambas at ...1...
Sat Feb 10 00:18:25 CET 2007
On Friday 09 February 2007 23:00, Daniel Campos wrote:
> Not a bad idea, I think nobody thought in it before...
This is what gb.form.mdi does!
>
> 2007/2/9, sbungay <sbungay at ...981...>:
> > Goal: To reparent an instance of a form on the tabstrip index of my
> > choice. The code snippet is below.
> >
> > ' Gambas class file
> > PRIVATE mForm1 AS Form
> >
> > Private SUB Form2_Open()
> > mForm1 = NEW Form1
> >
> > With mForm1
> > .Reparent(TabStrip1[1]) ' This will give
> > ' Invalid Use of Virtual Class
> > .Reparent(TabStrip1) ' This works fine but the form
> > ' Only appears on the first tab.
> > End With
> > END
> >
> >
> > This is kind of (but not exactly) like what I would do if I created
> > an activex control (now I have to wash my hands) and hosted it on a form
> > in the container of my choosing.
> >
> > Steve.
> >
You must set the TabStrip index before doing the reparenting.
Regards,
--
Benoit Minisini
More information about the User
mailing list