Is dropdown list of combo box down?

schimmel

New member
Local time
Today, 12:32
Joined
Feb 3, 2011
Messages
9
I want to make the form to act different at MouseDown event in a combo box depending on whether the dropdown is currently down or not. Is there any way to do it? I could not the property of a dropdown list state for a combo box.

Thank you!
 
Welcome to the forum.

Perhaps this articel will provide you with a solution.

Thank you!

Looks like it will help. But it will take a while to go through. I am not an expert in API. However that is what I expected.
 
Cool! I actually do not even need to understand how these API's work. The code works as it is!
 
Just out of interest schimmel, why did you need to know the dropped state of a combo box?
 
So after I click on an item in the list it would move focus to some other control on the form but it would not do it when I am entering the combo box. "Change" event would not work because I need to move the focus even if I select the same value from the list as what was in the box before. Maybe some other event would do it. I would appreciate if you let me know. I still can't make work quite right which has nothing to do with the code I copied. I am just trying to figure out the details of event sequence duiring the click, drop-down list folding and updating the field.
 
Last edited:
Looks like I have figured. Just declared a module-level boolean var which sets to fIsComboOpen (the function from that code which checks whether the drop-down list is open) at "MouseDown" event but the rest is done at "Click" event according to what that boolean is now.
 
So basically you want it to move focus only what was typed corresponds to an item in the list?
 
No. In either case -- whether it corresponds or not. But only if you click on the drop-down list but when you click on the box itself to move focus there by using the mouse. Hm... what somebody still clicks it above the open drop-down list on the box itself when the list open... checked -- nothing happens. I guess it does not treat as a "MouseDown" or "Click" event at all. So it is good.
 
I don't completely follow. What does the user have to type for it to move focus?

Perhaps you can give a scenario to help explain your reasoning.
 
Besides moving the focus it does some other stuff too.
For it to happen, the user has to click on a item in the open list (to select an item) but not click on the box with the list closed.
 
Click event happens when the dropdown list is already closed
 
I'm afraid I'm just not seeing the UI effect you're trying to achieve at all.
 
Thanks. I already achieved it as I explained here in the posting #7
 
Well, I'm glad that you achieved it. Not that it affects my ability to envisage the intent.
I'm sure it's just spiffing though.

Cheers
 

Users who are viewing this thread

Back
Top Bottom