Z
zacks
I have an application I am developing that has a Combo Box that is
intended to show a list of available tables in the selected DSN. I
have put code in the control's DropDown event handler to clear the
item list and reload it from the currently specified DSN (in a Text
Box control on the same form). This works well.
BUT ... if the specified DSN is invalid, I can display an appropriate
error message, but then then empty dropdown list is still displayed. I
have tried to suppress it by setting the control's DroppedDown
property to false if the error is encountered, but the empty dropdown
list is still being displayed and I have to click on the dropdown
button again to make it go away. What is also interesting is when I
click on the dropdown button to make it go away, the DropDown event
does not fire, only when it is first clicked.
So, how do I un-drop down a drop down?
intended to show a list of available tables in the selected DSN. I
have put code in the control's DropDown event handler to clear the
item list and reload it from the currently specified DSN (in a Text
Box control on the same form). This works well.
BUT ... if the specified DSN is invalid, I can display an appropriate
error message, but then then empty dropdown list is still displayed. I
have tried to suppress it by setting the control's DroppedDown
property to false if the error is encountered, but the empty dropdown
list is still being displayed and I have to click on the dropdown
button again to make it go away. What is also interesting is when I
click on the dropdown button to make it go away, the DropDown event
does not fire, only when it is first clicked.
So, how do I un-drop down a drop down?