views:

146

answers:

1

I have a System.Windows.Forms.ComboBox on a form and I want to capture the event just before the ComboBox's menu is displayed (something like "DroppingDown"). I can't seem to find a suitable event.

Is capturing this type of event possible with a ComboBox?

+1  A: 

The ComboBox should have a DropDown Event. If I am not mistaken, this event should fire immediately when the drop down list starts to show.

What exactly are you wanting to accomplish immediately before the drop down shows that necessitates your capturing of such an event?

Josh
Aha, you're right. I assumed that MS's description of "Occurs when the drop-down portion of a ComboBox is shown" meant AFTER it was shown; proves what they say about assumptions eh. Thanks. Oh, and as for your question, the combo is loaded with data from a db and I don't want to hit the db unless the user actually opens the combo menu.
Steve Dignan
So are you fetching a list of results from the DB based on what the user types in? You might consider doing some predictive fetching to give the illusion of instantaneous results to the user. Lag time may not be an issue for you since it is a desktop app, but if it is, you can gain a some happy users by doing some predictive fetching.
Josh