How can I determine if the comboxbox menu is open?

  • Thread starter Thread starter jamie
  • Start date Start date
J

jamie

I'm wanting to know if the combobox's little popup menu is open at any given
point. I'm thinking that this is the ContextMenu attribute for the combobox
but I can't find an attribute for it that says if it's open. It just will
tell me that It is going to open. I'm also wondering if there is a way to
open the menu through code?

Thanks
Jamie
 
It is not a contextmenu, it is a drop down.

You can open it by sending it a keybd_event F4 (search archives for further
details if you need to).

Don't know how to test if it is already open but if you share your use case
there might be alternatives...

Cheers
Daniel
 
Basically what I have is a datagrid that I'm wanting to do text entry into.
So I have a textBox that moves up and down to the current cell as I move
around. On some of the cells I want a combobox with the pull down to help
the users select what they want. So since in this particualar case I have a
column and I use the arrow keys to move around I'm trying to do the
following.

When I get to a combo box cell display the combo box

When the drop down is closed
Pressing Right on the combo box opens the drop down.
Pressing Left does nothing
Pressing Up or down moves to a different cell

When the drop down is open
pressing "Up" or "Down" moves within the drop down
Pressing Left Closes the drop down.
pressing Right does nothing

This could all be pointless if datagrid now supports direct text entry and
combobox's but it didn't when I started the work

Jamie
 
Back
Top