list_colwid

Gets/sets the width of a list column.

Available in:

Apps (win) Apps (char) Reportwriter RPC Standalone PL
X X X X X

Syntax

int list_colwid(list-name, col, [,width])
list          list-name
int           col, width

Description

Gets or sets the width of a list column. Use the function to set widths for list_view() and set the width in a list that is passed back via TRIMrpc.

list-namespecifies the list to format.
colspecifies the column (zero-based) to adjust.
widthspecifies the width in characters of the specified column.

Notes

If a list column's width is set to zero, then list_file() will not export the column's data by default. You must use list_file()'s save-col option to indicate that the column must be exported.

Example

Adjusts the fourth column to be 10 characters wide.
{
 list xx;

 xx = list_open("select * from staff" 1000, "RT List8");
 list_colwid(xx, 3, 10);
 list_view(xx, 0);
}