It seems that everyone forgot how the old C pointers were used...
Let's say that your have TextBox controls named txtObject (as an array) and
the columns of your 'matrix' are cNumCols. Just add a property Get into your
Form like this
private/public property get MyObject(byval row as integer, byval col as
integer) as TextBox
set MyObject = txtObject(col + row * cNumCols)
end property
in this way you can access your matrix of controls like
MyObject(i,j).Name = "Marco"
On Thursday, January 25, 2001 9:57 AM, John Walborn
[SMTP:JWalborn@m...] wrote:
> Yeah, this is the way that I have been doing it, but it is cumbersome. Y
> motion stays easy, but X motion is a pain.
>
> -----Original Message-----
> From: Chris Ellegood [mailto:jcellegood@h...]
> Sent: Thursday, January 25, 2001 9:25 AM
> To: professional vb
> Subject: [pro_vb] Re: Object Arrays
>
>
> Hmm... Perhaps you should think of the objects instead in terms of
absolute
> coordinates... so, in a game of Tic Tac Toe
>
> X _ _
> _ O _
> _ _ _
>
> The X could be expressed as being at 0,0 or as 0... then the O could be
> expressed as being at 1,2 or 5.
>
> Thanks.
>
> Chris Ellegood, ATP, xxx-xxx-xxxx
>
>
>
> ----- Original Message -----
> From: "Mark E. Watkins" <markw@l...>
> To: "professional vb" <pro_vb@p...>
> Sent: Thursday, January 25, 2001 10:37 AM
> Subject: [pro_vb] Re: Object Arrays
>
>
> > John,
> >
> > You can't create a two-dimensional control array. You should probably
> > rethink what your doing.
> >
> > ----- Original Message -----
> > From: "John Walborn" <JWalborn@m...>
> > To: "professional vb" <pro_vb@p...>
> > Sent: Thursday, January 25, 2001 9:31 AM
> > Subject: [pro_vb] Object Arrays
> >
> >
> > > Is there any way to create a two-dimensional object array?
> > >
> > > I am wanting to create a "grid" of controls and it would be much
easier
> to
> > > reference them by X and Y.
> > >
> > > I have tried making the object index "0,0" and it does not work. It
> seems
> > to
> > > be looking for a single digit. Any help would be appreciated.
> > >
> >
> >
> >
>