SetColumn

Description

Sets column information for a DataWindow, child DataWindow, or ListView control.

For syntax for a DataWindow or child DataWindow, see the SetColumn method for DataWindows in the DataWindow Reference or the online Help.

Applies to

ListView controls

Syntax

listviewname.SetColumn ( index, label, alignment, width )

Argument

Description

listviewname

The name of the ListView control for which you want to set column properties.

index

The number of the column for which you want to set column properties.

label

The label of the column for which you want to set column properties.

alignment

A value of the Alignment enumerated datatype specifying how to align the column. Values are:

  • Left! – Align the column at the left margin

  • Right! – Align the column at the right margin

  • Center! – Center the column between the left and right margins

  • Justify! – Not valid for the SetColumn function

width

The width of the column for which you want to set column properties.

Returns

Integer. Returns 1 if it succeeds and -1 if an error occurs.

Usage

SetColumn is used only in report views.

Examples

Example 1

This example sets the second column of a ListView:

lv_list.SetColumn(2 , "Order" , Center! , 800)

See also