[Gambas-user] Question about how to address more than 1 checkbox or picturebox item in for-next loop

ron ronstk at ...239...
Thu Jul 26 18:28:44 CEST 2007


On Thursday 26 July 2007 16:20, Ron Klinkien wrote:
> DIM i AS Integer
>  DIM SensorByte1 as Byte
>  DIM PBoxI AS PictureBox = [PictureBoxI0, PictureBoxI1, PictureBoxI2, 
> PictureBoxI3, PictureBoxI4, PictureBoxI5, PictureBoxI6, PictureBoxI7]
>        
> 
Hi Ron from Ron

change :
  DIM PBoxI AS PictureBox = [PictureBoxI0, PictureBoxI1, PictureBoxI2, 
 PictureBoxI3, PictureBoxI4, PictureBoxI5, PictureBoxI6, PictureBoxI7]
to
  DIM PBoxI AS Object[] = [PictureBoxI0, PictureBoxI1, PictureBoxI2, 
 PictureBoxI3, PictureBoxI4, PictureBoxI5, PictureBoxI6, PictureBoxI7]

Why Object? Well that is what it expects regarding the error :)
Not nice but should work
Why Object[]? Because you asign a array of PictureBoxI# to it

Secondly you can't do DIM PBoxI AS PictureBox[]

Hoop dat dit helpt. :)
 
Groeten:
Ron 




More information about the User mailing list