Why is the TListView Node text truncated with ellipsis until I switch ViewStyle?

Can someone help me understand why the displayed labels for TListView are truncated with ellipses when the program starts, but are fully displayed after switching to vsIcon and back again? I don't want any truncation or ellipse ...

Edit 1: Columns [0]. AutoSize - TRUE, MaxWidth - 50, Width - 50.

Edit 2: Fixed capture of the left hand, so the source text matches the source text.

TIA

alt text

+4
source share
2 answers

Peter Below posted an answer on the Embarcadero forum ( https://forums.embarcadero.com/thread.jspa?threadID=45670&tstart=0 ), pointing to an identical question asked a year ago: https://forums.embarcadero.com/thread. jspa? threadID = 27079 .

Summary - manually set the column width:

Uses CommCtrl; ListView_SetColumnWidth( listview.handle, 0, NewWidthOfColumnInPixels ); 
+1
source

Assuming you're using ViewStyle = vsReport, make sure you have a specific column that is wide enough to fit your longest text value. TListColumn.AutoSize does not always work correctly, especially when Listview is loaded.

+1
source

All Articles