mfc >> ComboBox drop up instead drop down

by Thomas Schindler » Wed, 17 May 2006 23:22:39 GMT

Hello
Clicking on the Combobox right box it show by default an SelectionWnd BELOW
the combobox,
but I want it show ABOVE the Combobox.
How can I achieve this? Thanks.
Tom






mfc >> ComboBox drop up instead drop down

by Ajay Kalra » Wed, 17 May 2006 23:38:23 GMT


AFAIK, you cant do this. It does it by itself whenever it finds that
the listbox will go offscreen.

---
Ajay




mfc >> ComboBox drop up instead drop down

by Eric Margheim » Thu, 18 May 2006 00:43:05 GMT





Couldn't you subclass the listbox and somehow reposition it when it is
displayed?




ComboBox drop up instead drop down

by Ajay Kalra » Thu, 18 May 2006 01:45:38 GMT

You could certainly try it. Looking back, it should not be too
difficult to do it. WM_SHOW or something similar should be handled and
listbox can be moved in its handler.

---
Ajay



ComboBox drop up instead drop down

by Thomas Schindler » Thu, 18 May 2006 16:44:24 GMT

> You could certainly try it. Looking back, it should not be too

It' s very difficult for me...
I don't find any WM_SHOW messages for CComboBox and its children in MS
Spy++.
I try it now to handle in WM_SETFOCUS. But I dont know how to obtain the
pointer to its edit or static control.

Greetings, T.






ComboBox drop up instead drop down

by Ajay Kalra » Thu, 18 May 2006 20:48:38 GMT

You will need to subclass the listbox portion of ComboBox and handle it
there. Spy++ should help you. To see how to subclass the edit control
and listbox of a CCombBox, see here:

http://support.microsoft.com/default.aspx?scid=kb ;en-us;q174667
http://www.codeproject.com/combobox/checkcombo.asp

---
Ajay



Similar Threads

1. Drop-down buttons, buttons with a drop-down menu, or something else

2. Is drop-down menu dropped down?

3. Drop-down list does not drop completely

I am populating a drop down list on a dialog box but have a 
problem with it: the drop down list does not drop completely. The list drops 
down just a little bit, enough to see the top of the first value. We tried 
several methods to try to make it expand more but with no effect. Does 
anyone have 
any idea why this may be happening? How can I make it expand to show 
at least two or three values? We are using straight C with eVC 4.0, no MFC 
and the Pocket PC 2003 SDK. The device is a Dell Axim running on Windows CE.

-- 
Armando

4. Drop Down Menu In ComboBox and the Refresh bug - CSharp/C#

5. Auto drop down combobox

I've got what at first appears to be a really simple problem.

I have a dropdown combobox with a list of names in, the user can enter text
into the edit portion or drop the combobox and select a name.

What I need to do is to drop the combobox when the user types and find the
nearest entry to what the user entered (so if they typed A, Andy may be the
nearest entry, the list should scroll, but not select, unless the user uses
arrow down or clicks with the mouse). This should progress this way as the
user enters more text.

I can use the DroppedDown property to drop the combobox, but if I do this in
the TextChanged event, then the nearest item in the combobox is selected and
the text is put into the edit box. I've played around with various state
variables, but none of them give me the functionality I require.

The same problem was solved previously in C++, but can I get the C# code to
work...

Any help would be greatly appreciated?

TIA

- Andy


6. Drop down a combobox programatically ? - CSharp/C#

7. ComboBox drop down button

Hi,

I have a combobox on a form with dropdown style. Is it possible to 'push' 
the dropdown arrow button from code - causing the combobox to dropdown.

regards Jesper, DK

8. Combobox fails to drop down