|
of_deletecolumn
|
|
Full name
|
pfc_u_lv.of_deletecolumn
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_deletecolumn(integer)
|
Name
|
Datatype
|
li_cnt
|
integer
|
li_cols
|
integer
|
li_index
|
integer
|
ls_colformat
|
string[]
|
ls_coltype
|
string[]
|
ls_columns
|
string[]
|
ls_empty
|
string[]
|
public function integer of_deletecolumn (integer ai_column);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_DeleteColumn
//
// Access: public
//
// Arguments: ai_column the column to be removed.
//
// Returns: Integer
// 1 if successful, -1 if an error occurred
//
// Description: Delete the column in the ListView control and sync the internal column arrays.
// Columns are displayed in Report View only.
//
// NOTE: If you perform this function on column 1 you
// should call of_refresh to refresh the data view.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0.03 Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
// Copyright © 1996-1997 Sybase, Inc. and its subsidiaries. All rights reserved.
// Any distribution of the PowerBuilder Foundation Classes (PFC)
// source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////
integer li_cols, li_cnt, li_index
string ls_columns[], ls_colformat[], ls_coltype[], ls_empty[]
li_Cols = UpperBound(is_Columns)
If (ai_column > li_cols) or (ai_column < 1) Then Return -1
// Delete the listview column
If this.DeleteColumn(ai_column) < 1 Then Return -1
// Sync internal arrays
For li_Cnt = 1 To (ai_column - 1)
ls_Columns[li_Cnt] = is_Columns[li_Cnt]
ls_ColFormat[li_Cnt] = is_ColFormat[li_Cnt]
ls_ColType[li_Cnt] = is_ColType[li_Cnt]
Next
For li_index = (ai_column + 1) To li_cols
ls_Columns[li_index - 1] = is_Columns[li_index]
ls_ColFormat[li_index - 1] = is_ColFormat[li_index]
ls_ColType[li_index - 1] = is_ColType[li_index]
Next
is_Columns = ls_empty
is_ColFormat = ls_empty
is_ColType = ls_empty
is_Columns = ls_Columns
is_ColFormat = ls_ColFormat
is_ColType = ls_ColType
return 1
end function
Name
|
Owner
|
listview.deletecolumn |
listview
|
systemfunctions.upperbound |
systemfunctions
|