如何:从 Windows 窗体 DomainUpDown 控件移除项
更新:2007 年 11 月
您可以通过调用 DomainUpDown.DomainUpDownItemCollection 类的 Remove 或 RemoveAt 方法,从 Windows 窗体 DomainUpDown 控件中移除项。 Remove 方法移除指定的项,而 RemoveAt 方法按照项的位置移除项。
移除项
使用 DomainUpDown.DomainUpDownItemCollection 类的 Remove 方法可按名称移除项。
DomainUpDown1.Items.Remove("noodles")
domainUpDown1.Items.Remove("noodles");
domainUpDown1->Items->Remove("noodles");
- 或 -
使用 RemoveAt 方法按照项的位置移除项。
' Removes the first item in the list. DomainUpDown1.Items.RemoveAt(0)
// Removes the first item in the list. domainUpDown1.Items.RemoveAt(0);
// Removes the first item in the list. domainUpDown1->Items->RemoveAt(0);
请参见
参考
DomainUpDown.DomainUpDownItemCollection.Remove
DomainUpDown.DomainUpDownItemCollection.RemoveAt