1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
'
' Ajoute un radio ou un label
'
Private Sub ajouterElementArbre(typeElem, Left, topRadio, caption, Tag, cocher)
Dim Obj As Control
Dim Usf As Object
If typeElem = "label" Then
Set Obj = frameArbre.Controls.Add("forms.label.1")
Else
If ligneABloquerFusion(Tag) = False Then
Set Obj = frameArbre.Controls.Add("forms.Optionbutton.1")
If cocher = True Then
Obj.Value = True
End If
Else
Set Obj = frameArbre.Controls.Add("forms.label.1")
End If
End If
With Obj
.Name = "label" & Tag
.Object.caption = caption
.Left = Left
.Top = topRadio
.Width = 250
.Height = 14
.Tag = Tag
End With
End Sub
'Exemple d'appel
ajouterElementArbre "option", "150", "30", "Text de mon Optionbutton", 6, false |
Partager