2 questions about ComboBox
Posted on 2004-10-31
Let's say that I have two comboboxes named cboDay and cboMonth.
1) Let's say i want to type something into my combobox and when i click enter, i want that text that i typed to be automatically added to the list. So the next time i drop down my combobox, i want that text to be in the list.
I already set dropDownStyle to DropDown. If i have to type a code for that, could you please tell me in what procedure to write it?
2)cboMonth has months of the year from 1 to 12. CboDays initially has numbers from 1 to 31. But not all the months has same number of days.
How will i make it so that if user clicks 2 from cboMonth, days in cboDay will remove 30 and 31 from the list? (February may have 29 days but not 30 and 31.) And when user clicks 3 from cboMonth , 30 and 31 will be added to cboDays list.
Is it gonna be something like,
if cboMonth.selectedIndex = 1 then