How to wrap the text in a column using ObjectListView
I'm using ObjectListView and I'm trying to wrap the text in a column.
I have 2 columns and have set the WordWrap property of the second column to true. It doesn't appear to work.
In the 开发者_C百科image below the last line should wrap
I have searched SO and tried all the suggestions including setting OwnerDraw to true but nothing helps.
Any ideas?
"Owner draw" means: I (the control) will not draw anything, I will assume that you (the control consumer) will do it all for me.
That is a general statement, I know nothing of this specific control. It seems to me that the WordWrap feature is not implemented. So you either have to implement the feature in the control itself or use OwnerDraw which means doing it all yourself.
Updated
By the way, I encounter this need myself quite often. I don't bother with ListView or 3rd party controls, I simply use a DataGridView and make it look and behave like a ListView. It can do wrapping text columns.
According to this answer, your ObjectListView must be "OwnerDrawn".
精彩评论