更新时间:2023-12-04 09:38:40
to完成此操作:
(以其中一个标签为例)
to complete this :
(by the example of one of these Labels)
With newLabel_Name
.Name = "Label_dyna_Name" + ID
.Font = New System.Drawing.Font("Tahoma", 7.25!, System.Drawing.FontStyle.Bold)
.Text = Name.ToUpper
.Dock = DockStyle.Fill
.TextAlign = ContentAlignment.BottomRight
.Size = New System.Drawing.Size(0, 13)
.ForeColor = Color.White
.Parent = panel ' replaces the panel.Controls.Add(newLabel_Name)
.AddHandler .MouseDown, AddressOf DynaPanel_MouseDown
End With
但注意:
处理Panel时,manuel创建的Handler不会自动删除。为此,你必须通过自己的Dispose-Method(或Detach-Method)删除它。
But Attention :
This manuel created Handler is not removed automaticly when disposing the Panel. For this you MUST remove it by your own Dispose-Method (or Detach-Method).