Add a lot of items to ComboBox

xiaoxiao2021-03-06  83

ComboBox1.Beginupdate (); for (int i = 1; i <= 24; i ) {ComboBOBOX1.Items.Add (" i.tostring ());} Endupdate ();

A few days ago, I remembered the service process of the automatic timing, decided to do it at this evening. I didn't use C # in two or three months. When I started, I couldn't even change the input and output. Go to MSDN, I found that MSDN has not been installed, and quickly put it. Search: Enter input and start now. The shutdown code is found on 9CBS. When choosing time, minutes, seconds, a combo box is used in seconds, and if you want to enter from 1 to 24, it is not very troublesome. From 1 to 60, you will be troublesome. I want to print out 1-60 in a loop, then copy it to the Item Item editor of ComboBox, I still feel trouble, lazy, go to MSDN to find it, it is estimated that there will be more introduced methods, go to MSDN to check it. I really found ComboBox's beginupdate () and endUpdate () methods to add item in Items.

转载请注明原文地址:https://www.9cbs.com/read-122704.html

New Post(0)