如何找到组合框的最后一个索引? [英] how to find the last index of combobox?

查看:94
本文介绍了如何找到组合框的最后一个索引?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友们,



i正在开发用于编辑pdf.in的窗口应用程序,我有两个组合框.one用于显示问题名称,另一个用于文章name.how找到组合框的最后一个索引?



i想要在两个组合框达到它的最后一个索引时清除字典。



提前感谢

Dear friends,

i am developing window application for editing pdf.in that i have two combo box .one is for displaying issue name,another one is for article name.how to find the last index of the combo box?

i want to clear the dictionary when the two combobox reached it''s last index.

thanks in advance

推荐答案





我不确定你想要得到什么,但如果你只需要你可以做的最后一个索引:



Hi Jai,

Im not sure on what you are trying to get but if you simply need the last index you could do :

combobox.Items.Count - 1





并定位于:





and to position on that :

last = combobox.items.count - 1

combobox.selectedindex = last







我希望这有帮助,

VG




I hope this helps,
VG


comboBox有一个MaxDropDownI tems属性(也可以在设计时或运行时设置)



例如
comboBox has a MaxDropDownItems property (which can also be set at design time or runtime)

e.g.
this.comboBox1.MaxDropDownItems = 30;


这篇关于如何找到组合框的最后一个索引?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆