|
-
Nov 22nd, 2000, 03:37 PM
#1
Thread Starter
Addicted Member
Im using this to create buttons at run time, draggin them from another form
Code:
Set Boton = frmDropWindow.Controls.Add("VB.CommandButton", ControlName)
Is there a way to make a control array of them?, because when one is created, the older one stops working, so they are pretty much useless.
Thanks :0
-
Nov 22nd, 2000, 05:17 PM
#2
Once you create the 1st control, set the Index to 0 then create the same control again (with the same name) and it'll automatically go to 1, 2, 3 etc.
-
Nov 22nd, 2000, 05:26 PM
#3
_______
<?>
I didn't think you could set the index at run time.
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Nov 22nd, 2000, 05:41 PM
#4
Thread Starter
Addicted Member
-
Nov 24th, 2000, 07:31 AM
#5
New Member
naming the buttons
got this code from kedaman the other time,
Set Boton = frmDropWindow.Controls.Add("VB.CommandButton", "ControlName" & arrayNumber)
Just add the array number to the controlname, producing a ControlName1, ControlName2, etc..keeps the names unique
Works great!
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
|