![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I want to display a series of controls (Comboboxes) in a Groupbox. Therefor, I use following code: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim iTop As Integer = 30 Dim cboZoekCriterium As New ComboBox For iTeller = 1 To 6 With cboZoekCriterium .Location = New Point(10, iTop) .Name = "cboZoekCriterium_" & String.Format("{0:0000}", iTeller) .Size = New Size(250, 20) End With GroupBox1.Height = iTop + 40 Me.GroupBox1.Controls.Add(cboZoekCriterium) iTop = iTop + 40 Next iTeller End Sub Can anyone explain me why only the last Combobox is displayed in the Groupbox? If I change the number of 6 to any other number, again only the last Combobox is displayed. Many thanks and greetings, Michel How many Combobox objects do you create? (Hint: the answer is ***1***). |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |