我有一个自定义控件,我在 flowlayoutpanel 中添加了一些控件:
Dim drive As New WindowsControlLibrary1.UserControl1()
drive.FileSystemlable = reader.GetString(2)
drive.AbalableSpaceLable = Convert.ToInt32(reader.GetString(4) / 1024)
drive.TotalSpaceLable = Convert.ToInt32(reader.GetString(5) / 1024)
drive.SetVolumeLable = reader.GetString(3)
Dim usedspace As Integer = Convert.ToInt32(reader.GetString(5)) - Convert.ToInt32(reader.GetString(4))
drive.BarValue = usedspace / 1024
Form1.FlowLayoutPanel1.Controls.Add(drive)
我现在如何更新这些控件而不是清除它们并再次重新添加它们?