Why does the width of the auto-suggest dropdown box not match the width of the combobox?

Look real closely and you'll notice that its width is user-customizable. The resizing grip at the lower right corner is the dead giveaway.

Look real closely and you'll notice that its width is user-customizable. The resizing grip at the lower right corner is the dead giveaway: There's no built-in option to specify the width, and that's by design. Under the covers, the ComboBox control actually uses the SHAutoCompleteAPI function to implement this functionality.

The auto-suggest box always displays with the last width chosen by the user. It can just as easily appear much larger than the width of the combo box. If you really wanted to do this, you could subclass the ComboBox control, P/Invoke a bunch of functions from the Windows API, and get the handle to the auto-suggestion box window, which you could then resize.

But the code is ugly, and it's hardly worth the trouble. Sample code is available on this thread.

Thanks for the answer. I used re-size grip option suggested but if it is used then the height also remains constant along-with width. In normal case height is adjusted as per the number of element in list.Is there work around for this?

– vaichidrewar Feb 6 at 9:37 @vai: I'm not sure what you mean. Neither the width nor the height are user-configurable, at least not without a lot of work (see the link in my answer). The resize grip will let the user resize both the width and the height of the box.

It's exactly the same UI that's found in every Open/Save dialog box. The user either knows how it works, or doesn't care. – Cody Gray Feb 6 at 9:44.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions