Click here to Skip to main content
15,867,568 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using a combobox control to show names stored in a database ( I need to preserve space, that is why I use it instead of a listview, for example ).

My problem is that sometimes text is longer than the combobox so part of it can not be seen.

Is there a way to resize combobox' listbox so it can entirely show text, or at least to enable some kind of horizontal scrolling so the user can scroll to see the entire text?

Looking through combobox documentation, I haven't found any style that can solve my problem. Trying to add WS_HSCROLL as a style in my CreateWindowEx call didn't help either.

Thank you.
Posted

1 solution

Adjust combo box drop down list width to longest string width[^]

Please check the above link.

Tip : Always search before posting a question. It will help you a lot.

Regards,
 
Share this answer
 
Comments
AlwaysLearningNewStuff 9-Dec-14 10:28am    
Thank you for helping. The code is in C#, but I get the point. I was hoping to bypass that route but seems that it is the only way to go...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900