Hi Dilip, yeah had a play with the ArrayList with regards to this. You are
right it is relatively easy and gives me the functionality I had. Just a
couple of points on this though.
Firstly to access the textbox's as such I need to cast them to a TextBox
type (since they are added to the collection as Object), the control array
in VB6 was of the type of the first control (not object).
Secondly I am having to code functionality that the designer (in VS6)
previously did effortlessly by just naming a control using an index .
-I just hoped that the designer retained this functionality -regardless of
the code that is eventually generated.
--
Br,
Mark Broadbent
mcdba , mcse+i
=============
"Dilip Krishnan" <dilipdotnet..NOSPAM..@apdiya.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
It is still easy depending on what you want to do. While VB had it to
help users create "dynamic" controls which was otherwise not possible
without control arrays, in C# you can create any number of controls and
add it to an array list and achieve the same thing.
Mark Broadbent wrote:
In VB6 (using visual studio) it was possible to create a control array
at design time by simply adding the control (e.g. textbox) and renaming it
to what would become the first element
e.g.
Name => MyTextbox
to
Name => MyTextbox(1)
you could then copy this control array element and paste back onto form
to add a new element to the control array.
Is this possible using Visual Studio 2003? I've seen the following
http://msdn.microsoft.com/library/de...visualcnet.asp but cannot find anything about doing this at design time (it was sooooo
easy before!)
Any ideas/ thoughts anyone?
Cheers.
--
Regards,
Dilip Krishnan
MCAD, MCSD.net
dilipdotnet at apdiya dot com