how to set text size of listview item in c# ( windows forms)? ListViewItem of LIstView control is displaying only upto开发者_开发百科 259 characters? why
Is it possible to insert more than 259 characters to a listviewitem?
The 259 limit is by design...(I guess because the ListView was originally designed for showing lists of files, etc - so the limit probably comes from the file system's MAX_PATH limitation - I don't know...just a guess!?).
The item does store the full text though - it's just truncated for display. So you should be able to override it to display the full text, or maybe find another way to show the full information in your UI like the suggestion here...
http://support.microsoft.com/default.aspx?scid=KB;EN-US;321104
You'll need to handle your own rendering of items to do that. Inherit from a ListView, hook up to the draw item event, and manually render your ListViewItems.
Yes, they are limited to a certain number of characters. Instead, add a tooltip there. Whenever the user hovers the listview item, even if the text is truncated with elipsis, the tooltip will display all text.
精彩评论