[b]Bonsoir à tous
Je voudrais instancier un GroupBox contenant divers Controls (RadioButton et Button)
J'ai écrit le code d'essai suivant :
Dim groupBox1 As New GroupBox()
With groupBox1
.Width = 300
.Height = 100
.BackColor = Color.Aquamarine
.FlatStyle = FlatStyle.Standard
.Left = ToucheSortie.Left
.Top = ToucheSortie.Top + ToucheSortie.Height + 5
.Text = "ABRACADABRA"
End With
Dim button1 As New Button()
With button1
.Width = 80
.Height = 60
.BackColor = Color.DarkOrchid
.Left = ToucheSortie.Left
.Top = ToucheSortie.Top + ToucheSortie.Height + 20
End With
Dim button2 As New Button()
With button2
.Width = 80
.Height = 60
.BackColor = Color.DarkGoldenrod
.Left = ToucheSortie.Left + 100
.Top = ToucheSortie.Top + ToucheSortie.Height + 20
End With
groupBox1.Controls.Add(button1)
groupBox1.Controls.Add(button2)
PageModifClient.Controls.Add(groupBox1)
Au débogage, le GroupBox s'affiche, mais les boutons sonr invisibles !
Quequ'un pourrait-il m'indiquer ce qui cloche ?
Un chaleureux merci à l'avance
jedry
/b