I am using an UltraListView where each item's value.ToString() provides the text that is displayed to the user. When the value object changes what it returns for ToString to be a longer string, the item clips the the text even though there is plenty of room in the column.
How can I prevent the clipping?
(I am building with 2009.2)
Hello Larry,
As far I understand you are using UltraListView with .View set to Details. To manage Text trimming set .ItemSettings.Appearance.TextTrimming to one of enumerated value or there are settings regarding the column sizing like .AutoFitColumns which will control the sizing.
Let me know if you have any further questions.
Thank you for your response Hristo.
I am actually using .View set to List. I have only one column and do not need a column header. I tried setting the .View to Details but that did not help. Plus it added a column header.
I tried several of the TextTrimming values but that only seems to change what happens when text is trimmed. It does not seem to affect the size of the item's text region.
The .AutoFitColumns did not affect the size of the text region either.
If I change the name such that the text is trimmed, selecting a different item in the list causes the full text of the modified item to become visible.
Is there something I can call that will cause the text extent to be recalculated?
Try setting UltraListView.ViewSettingsList.ColumnWidth to -1.
OK, we will test it again once we have upgraded to the latest version.
Thanks.
I tried this with the latest 10.1 source and was not able to see anything wrong. In all likelihood there was a bug that has been fixed since the version that you are using was compiled. You should download the latest service release; even the latest 9.2 service release might have the fix in it.
Hristo: My app does not use the "in place" editing feature to change the text. Also, I was not able to open your example solution because I am using VS2008.
Brian: Setting the ColumnWidth to -1 did not change the behavior.
I have attached a zip of an example app and solution that demonstrates my workaround to the problem. If you comment out the 3 lines of kludge code you can see the clipped text behavior.