How to: Add Items to Windows Forms DomainUpDown Controls Programmatically
You can add items to the Windows Forms DomainUpDown control in code. Call the Add or Insert method of the DomainUpDown.DomainUpDownItemCollection class to add items to the control's Items property. The Add method adds an item to the end of a collection, while the Insert method adds an item at a specified position.
To add a new item
Use the Add method to add an item to the end of the list of items.
DomainUpDown1.Items.Add("noodles")
domainUpDown1.Items.Add("noodles");
domainUpDown1->Items->Add("noodles");
-or-
Use the Insert method to insert an item into the list at a specified position.
' Inserts an item at the third position in the list DomainUpDown1.Items.Insert(2, "rice")
// Inserts an item at the third position in the list domainUpDown1.Items.Insert(2, "rice");
// Inserts an item at the third position in the list domainUpDown1->Items->Insert(2, "rice");
See also
Sadarbojieties ar mums vietnē GitHub
Šī satura avotu var atrast vietnē GitHub, kur varat arī izveidot un pārskatīt problēmas un atgādāšanas pieprasījumus. Lai iegūtu papildinformāciju, skatiet mūsu līdzstrādnieku rokasgrāmatu.
.NET Desktop feedback
Atsauksmes
https://aka.ms/ContentUserFeedback.
Drīzumā: 2024. gada laikā mēs pakāpeniski pārtrauksim izmantot “GitHub problēmas” kā atsauksmju par saturu mehānismu un aizstāsim to ar jaunu atsauksmju sistēmu. Papildinformāciju skatiet:Iesniegt un skatīt atsauksmes par