Hi, I have a problem but cannot figure out a good solution to it.
I am trying to create a form that creates a bunch of panels during runtime, and I want to be able to send commands (such as false visibility, etc) to the panels also during runtime.
Once I create a bunch of panels (each using the same 'creation' code), how can I call them up again to send commands to them?
I figure I can add them to an array and call them using:
etc, but this results in a 'reference/instance' vb error.
Is this bad coding, or am I missing something completely?
I seem to remember (i think it was with actionscript 2.0 coding) that you can call objects in this sort of way:
Is there this sort coding option in .NET?
I can't figure out another method (other than the array one, which isnt working for me anyway) to call a runtime created object, because if I create an panel like so:
how to I then call it later on to send commands to it?
Thankyou, I am still a programming amateur and want to jump this hurdle :-P
I am trying to create a form that creates a bunch of panels during runtime, and I want to be able to send commands (such as false visibility, etc) to the panels also during runtime.
Once I create a bunch of panels (each using the same 'creation' code), how can I call them up again to send commands to them?
I figure I can add them to an array and call them using:
Code:
arrayObjects(2).visible = false
Is this bad coding, or am I missing something completely?
I seem to remember (i think it was with actionscript 2.0 coding) that you can call objects in this sort of way:
Code:
["panel" & 4].visible = false
I can't figure out another method (other than the array one, which isnt working for me anyway) to call a runtime created object, because if I create an panel like so:
Code:
dim pnl as new Panel pnl.Name = "panel" & i 'for example, i = 3 at this stage, for the 3rd panel
Thankyou, I am still a programming amateur and want to jump this hurdle :-P