|
-
Sep 16th, 2003, 03:44 AM
#1
Thread Starter
Lively Member
How to Reference a control through a variable ?
I am working on a small project and I need to reference controls that they are created during runtime. The name of the control is saved in a variable, is there a way to refer to this control.
Example
dim A as string
dim B as textbox
somewhere in code A="SOMENAME", this name is created randomly
B= new textbox
B.name=A
pnlcontrols.controls.add(B)
Later in the program I need to refer to the SOMENAME.text
but the value SOMENAME is held in the variable A, A.text is not possible. Is there a way to do this. I need to replace A with the value of A at runtime.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|