|
-
Oct 1st, 2002, 04:39 PM
#1
Thread Starter
New Member
How to refer to a control using a function
I want to refer to use a function for referring to a control something like this:
functionname("cmdbutton1").height=32
this should set the height of the command button named "cmdbutton1" to 32. Does anyone know how to do this?
-
Oct 1st, 2002, 06:23 PM
#2
I think you are going to have to explain what it is you are trying to do a little better. You want to function to return a control if you pass in the name? Are you talking about on the same form?
-
Oct 2nd, 2002, 08:36 AM
#3
you can say
public functionname(mycontrol As Button, Height as integer) as blah
but you cant give functions properties...
-
Oct 2nd, 2002, 10:21 AM
#4
Although something like this may work:
functionname(controlname as string) as control
Which then you could use the .height after it to work with the control it returned without another variable, but its kind of ugly.
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
|