Click here to Skip to main content
15,888,079 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
See more:
i have a long string(60 charector) but my combobox is smaller.
problem is this when i click on combobox then its not showing total length of string.its showing only 30 character only.
what should i do.
please help me
thank you!
Posted

have a look at the DropdownWidth property on the combobox

have a read of this for further info

MSDN: combobox dropdownwidth property[^]
 
Share this answer
 
Comments
Menon Santosh 8-Mar-13 7:25am    
nice Solution
Simon_Whale 8-Mar-13 7:28am    
thanks :)
JayantaChatterjee 8-Mar-13 12:45pm    
It Works fine...
Change the size of your combobox so its width allows to display the whole string.

OR

Limit the size of your string so that it can be full displayed in the combobox.

OR

Change the size of the font of the combobox.
 
Share this answer
 
Comments
arvindnitin7 8-Mar-13 6:26am    
i dont want to increase my combobox size.
and size of my string contains minimum 100 charecter so please give me another solution.
phil.o 8-Mar-13 6:31am    
So you only have 2 solutions left. Which one do you prefer ?
Have a look at System.Windows.Forms.TextRenderer. You could use it to measure the length of your Combobox's text and ajust the size respectively.

Hope this helps :-)
 
Share this answer
 
v2
Comments
JayantaChatterjee 8-Mar-13 6:34am    
Sir, ComboBox doesn't have the AutoSize property like a Label...
Mitchell J. 8-Mar-13 6:35am    
Oops. My Mistake...
arvindnitin7 8-Mar-13 6:47am    
there is no auto size property of combobox.
plz give another solution
kishore Rajendran 8-Mar-13 6:55am    
phil.o is correct,if you want to display full string,then increase the size of the combobox

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