i have a listbox a set size and i dont want a horizontal scrolling bar. the problem is that many of the items in my listbox are longer than the listbox itself. is there something i can set so that the listbox show elipses where the text is cut off? smurf
Posted on 2001-06-14 11:01:00 by smurf
<--- moron :D This message was edited by fresh, on 6/15/2001 7:07:32 PM
Posted on 2001-06-15 05:05:00 by fresh
Smurf, Calculate the length of the string using GetTextExtentPoint32, then check it against the width of your window. if it fits, not problem. If it doesn't fit, remove the last char from the string, then add the size of the elipsis (...) keep removing chars until it fits (don't really remove them here, just decrement the 3rd parameter), then add the elipsis on to your string and put it in the listview. umbongo This message was edited by umbongo, on 6/15/2001 8:06:31 AM
Posted on 2001-06-15 08:05:00 by umbongo