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
| With FormProjet.TabPage1
'suppression des controls du panel
For Each Control In .Controls
Control.dispose()
Next
For i = 0 To arrTache.Count - 1
t = Split(arrTache(i), ";")
nbjour = t(0)
dateecheance = t(1)
nomprojet = t(2)
descriptionTache = t(3)
CouleurTache = t(4)
idProjet = t(5)
idTache = t(6)
'Creation du label
Dim lbl As New Label
lbl.Text = t(3)
lbl.Left = 10
lbl.Padding = New Padding(5, 5, 5, 5)
lbl.Anchor = AnchorStyles.Right And AnchorStyles.Left And AnchorStyles.Top
lbl.AutoSize = False
lbl.Width = .Width - 20
lbl.Height = 40
lbl.TextAlign = ContentAlignment.MiddleCenter
lbl.BackColor = Color.FromName(CouleurTache)
topcumule = lbl.Height + 20 + topcumule
lbl.Location = New System.Drawing.Point(0, topcumule)
.Controls.Add(lbl)
Next
.BackColor = Color.Cyan
.AutoScrollMinSize = New Size(.Width - 40, topcumule + 200)'j'ai mis cette ligne pour avoir la scrollbar verticale |
Partager