of_AddColumn


pfcmain.pbl   >   pfc_u_lv   >   of_AddColumn   

Full name pfc_u_lv.of_AddColumn
Access public
Extend of integer
Return value integer
Prototype public function integer of_AddColumn(string,string,alignment)

Name Datatype
No Data

Name Datatype
li_Width Integer

public function integer of_AddColumn (string as_columnname, string as_columnlabel, alignment aal_alignment);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  of_AddColumn
//
//	Access:  public
//
//	Arguments:
//	as_ColumnName			The column in the DataWindow object to add as a column in
//									the ListView. 
//	as_ColumnLabel			The heading for the column to display in the ListView
//	aal_Alignment			The alignment of the column in the ListView (Left!, Right!, Center!, Justify!).
//
//	Returns:		Integer
//					The index of the column if added successfully, -1 if an error occurred
//
//	Description:	Add a column to the ListView control.  It will be displayed in Report View only.
//
//						This function overrides the real of_AddColumn to allow the column width to be
//						determined by the width of the column in the DataWindow.
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	5.0   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_Width

// Get the width of the column in the DataWindow

li_Width = Integer(ids_Source.Describe(as_ColumnName + ".width"))

// Add the column to the ListView
Return of_AddColumn(as_ColumnName, as_ColumnLabel, aal_Alignment, li_Width)

end function

     
Name Owner
pfc_u_lv.of_AddColumn pfc_u_lv

     
Name Owner
datastore.describe datastore
systemfunctions.integer systemfunctions
pfc_u_lv.of_AddColumn pfc_u_lv

     
Full name
No Data

     
Name Scope
No Data