DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C# (http://www.daniweb.com/forums/forum61.html)
-   -   default choice of ComboBox (http://www.daniweb.com/forums/thread163982.html)

SerogaM Dec 24th, 2008 2:51 pm
default choice of ComboBox
 
Hi,I'm new in WinForms Application help me change my ComboBox to default state of one of Collections I have
Thanks Sergey

Ramy Mahrous Dec 24th, 2008 4:15 pm
Re: default choice of ComboBox
 
Set the property SelectedIndex to the item's index you want it to be the default...
Say we want to show the 6th item
In form load handler add this piece of code
comboBox1.SelectedIndex = 5;

Ramy Mahrous Dec 28th, 2008 7:32 am
Re: default choice of ComboBox
 
Please SerogaM, mark this thread as solved if you question correctly answered.


All times are GMT -4. The time now is 3:48 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC