How to get the number of items in a combobox?

被刻印的时光 ゝ 提交于 2019-12-22 02:06:09

问题


How can I get the number of items listed in a combobox?


回答1:


Try

var count = comboBox.Items.Count;



回答2:


You should reference Count of the Items property.

myComboBox.Items.Count



回答3:


comboBox.Items.Count;

Doesn't work for me.

I use :

comboBox->count();


来源:https://stackoverflow.com/questions/768513/how-to-get-the-number-of-items-in-a-combobox

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!