[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gambas-user
Subject:    Re: [Gambas-user] Arrays of controls
From:       Dag-Jarle Johansen <dag.jarle.johansen () gmail ! com>
Date:       2011-08-28 16:38:16
Message-ID: CAGqtd7M+F=tYsA7n+3A3X58G5iiHzC3jwgsvX9-PsijhsXo4cQ () mail ! gmail ! com
[Download RAW message or body]

hi Benoit,

thank you. Now I have two solutions possible :-)

By the way, congratulations to the development of Gambas, it is real grown
up now. The speed of development makes it a little difficult to follow up,
as I have some breaks doing other projects. (Often forgetting what I already
knew, getting old, I presume).

Thanks again,
regards
Dag-Jarle Johansen

2011/8/28 Benoît Minisini <gambas@users.sourceforge.net>

> > Hi out there,
> >
> > I do not check this at all:
> >
> > Public Sub Page_First_Init()
> >     Dim hPictureBox As PictureBox
> >     Dim I As Integer
> >     For i = 0 To 9
> >         hPictureBox = New PictureBox(Me) As "PBX"
> >         hPictureBox.Tag = i
> >     Next
> > End
> >
> > Seems to work. But how do I call one of this bitmaps, for example make
> the
> > first visible, and resize it? I have a complete crash with the FOR EACH,
> do
> > not understand it at all, what to define where.
> >
> > I will be really grateful for some detailled help here, because it levels
> > up the software massive, when I get this jump. I have looked a lot
> around,
> > but for the point I don't understand - nothing.
> >
> > In this case PBX_Click() will help me nothing, because all PictureBoxes
> > have to be invisible at start.
> >
> > Thanks in advance and regards,
> > Dag-Jarle johansen
>
> The solution is in the mail subject.
>
> If you use Gambas 3, you can do that:
>
> ' ---------
>
> Private $aPictureBox As PictureBox[]
>
> Public Sub Page_First_Init()
>    Dim hPictureBox As PictureBox
>    Dim I As Integer
>     $aPictureBox = New PictureBox[10]
>     For i = 0 To 9
>        hPictureBox = New PictureBox(Me) As "PBX"
>        hPictureBox.Tag = i
>         $aPictureBox[i] = hPictureBox
>    Next
> End
>
> ' ---------
>
> Then you will access the i-th PictureBox somewhere else with
> $aPictureBox[i].
>
> Regards,
>
> --
> Benoît Minisini
>
>
> ------------------------------------------------------------------------------
> EMC VNX: the world's simplest storage, starting under $10K
> The only unified storage solution that offers unified management
> Up to 160% more powerful than alternatives and 25% more efficient.
> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
> _______________________________________________
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management 
Up to 160% more powerful than alternatives and 25% more efficient. 
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic