|
-
Oct 26th, 2003, 05:03 PM
#1
Thread Starter
New Member
An easy question
How can i initialize VB contorls in a loop, e.g. how do I name a TabPage being created in a loop when I want to create and label an unkown number of them.
Like so,
PHP Code:
i = 2
For i = 2 To Pre_WS_Count
Dim PreWSi As New TabPage()
PreWSi.Text = "PreWS " & Str(i))
etc..
Next i
where I want the i in PreWSi to be a number that corresponds to the loop index. I basically don't know how to get the i to label properly where the desired output is.....
PreWS1
PreWS2
PreWS3
etc...
-
Oct 26th, 2003, 09:52 PM
#2
Lively Member
Hi
i = 2
For i = 2 To Pre_WS_Count
Dim PreWSi As New TabPage()
PreWSi.Text = "PreWS " & i
myTabControl.TabPage.Add(PreWsi)
etc..
Next i
-
Oct 27th, 2003, 09:45 AM
#3
Thread Starter
New Member
So just leaving it as PreWSi will work?
-
Oct 28th, 2003, 09:17 PM
#4
Lively Member
As long as don't forget to add the pages.
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
|