Combo box problem

hi

im having a little problem with combobox control

the problem is that when i show another form on the dropdown event of combobox then the combobox dosent remains drop down...

but when i show a dialog (.showdialog) the combobox remains drop down even after the dialog box is closed......

is there any way i can close the drop down of combobox without clicking it.....on some event of my dialog box

thanks in advance




Answer this question

Combo box problem

  • Kamii47

    im displaying second form on the dropdown event of combobox of first form

    now after i close the second form the combobox in the first form shouldnt remain drop down

    this is okay when i use .show to display first form but when i use .showdialog the combo box remains drop down after i close the second form



  • Maheep

    Sorry if i missunderstand you. I was thinking on your own dropdown part of combo box. Nevermind. Can you tell as which event you use to call second form, or even better the source.

  • exp2000

    Can you move the code for calling second form from DropDown event to SelectedIndexChanged, just to see what will happen.

  • Moopy

    well this aint working

    i checked the value of comboBox1.DroppedDown property but it is already false within the .dropdown event

    ......................

    any other ideas



  • nbrege

    comboBox1.DroppedDown = false;

    should do the trick nicely. Note, what you are seeing may in fact be a painting issue in which case this probably won't help.


  • enric vives

    yes i tried this now form2 is not displaying

  • Dorian Dechant

    It should work with the .SelectedIndexChanged event handler (I just tried it and it worked for me). Could you post your code

  • Ray Bell

    excuse me sir we r talking abt control here not form....im actualy closing the second form...but the problem is the combobox on the first form stays drop down after i close the second form...........i dont want it to drop down....this only happens if i show the form using .showdialog.......it dosent happens if i use .show



  • anand.r

    You should close the form on any of this form events: Deactivate, Leave and also good on Escape key down. Not to mention on selected item with click, double click, select end pressed enter key.

  • Combo box problem