Click here to Skip to main content
15,891,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted

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

e.g.
this.comboBox1.MaxDropDownItems = 30;
 
Share this answer
 
Hi Jai,

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

VB
combobox.Items.Count - 1


and to position on that :

VB
last = combobox.items.count - 1

combobox.selectedindex = last



I hope this helps,
VG
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900