|
-
Sep 26th, 2006, 10:12 PM
#1
[RESOLVED] Creating Controls Within a Container
I've already created the controls, however I want to create them inside a container which I've also created programmatically, and have no clue how I should go about doing this, or if it's even possible. In this case, the controls I'm making are basically just being cloned from a control array I already have on the IDE.
VB Code:
Private Sub Command2_Click()
Dim cCount As Integer, i As Integer
cCount = 6
For i = 1 To cCount Step 1
Load cCompanies(i)
With cCompanies(i)
.Height = 400
.Top = .Height * i
.Visible = True
.ZOrder 1
End With
Load cCompaniesN(i)
With cCompaniesN(i)
.Top = cCompanies(i).Top + (cCompaniesN(i - 1).Top - cCompanies(i - 1).Top) 'cCompaniesN(i - 1).Top + cCompaniesN(i).Height
.Caption = "Test"
.Visible = True
.ZOrder 0
End With
End Sub
cCompaniesN is an array of labels, and cCompanies is an array of Picture Boxes, I want the labels to be contained in each corresponding picture box, because otherwise the labels won't be shown if they are underneath the box (labels = light control, picture box = heavy control, so ZOrder does nothing).
I'm assuming it has something to do with the .Container property, but so far anything I've tried has proved futile, and usually ends up with a type mismatch of some kind...
Anyone have any ideas? Any help would be appreciated..
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
|