Examples: ListView_ColumnCount()


The following example uses the ListView_ColumnCount() function to retrieve the number of columns for the Explorer List list view field. Then the ListView_ColumnSetWidth() function resizes each column to fully display the items in the column.

local integer column_count;
local integer i;
local integer previous_width;

{Get the number of columns in the list.}
column_count = ListView_ColumnCount('Explorer List');

for i = 1 to column_count do
	{Resize the column.}
	previous_width = ListView_ColumnSetWidth('Explorer List', i, LV_AUTO_SIZE);
end for;

Documentation Feedback