GetColumn
PowerScript function
Description
Retrieves column information for a DataWindow, child DataWindow, or
ListView control.
For syntax for a DataWindow or a child DataWindow, see the GetColumn
method for DataWindows in the section called “GetColumn” in DataWindow Reference.
Applies to
ListView controls
Syntax
|
1 |
listviewname.GetColumn ( index, label, alignment, width ) |
|
Argument |
Description |
|---|---|
|
listviewname |
The name of the ListView control from which you want to |
|
index |
An integer whose value is the index of the column for |
|
label |
A string identifying the label of the column for which you |
|
alignment |
A value of the enumerated datatype Alignment specifying
This argument is passed by reference. |
|
width |
An integer whose value is the width of the column for |
Return value
Integer.
Returns 1 if it succeeds and -1 if an error occurs.
Usage
Use label, alignment, and width to retrieve the properties for a
specified column.
Examples
This example uses the instance variable li_col to pass the column
number to GetColumn and retrieve the properties for the column. The script
uses SetColumn to change the column’s alignment:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
string ls_label,ls_align int li_width alignment la_align IF lv_list.View <> ListViewReport! THEN lv_list.View = ListViewReport! END IF IF li_col = 0 THEN MessageBox("Error!","Click on a Column bar.", & StopSign!) ELSE lv_list.GetColumn(li_col, ls_label, la_align, & li_width) lv_list.SetColumn(li_col, ls_label, Right!, & li_width) END IF |
See also