of_setpicturecolumn


pfcapsrv.pbl   >   pfc_n_cst_tvsrv_levelsource   >   of_setpicturecolumn   

Full name pfc_n_cst_tvsrv_levelsource.of_setpicturecolumn
Access public
Extend of integer
Return value integer
Prototype public function integer of_setpicturecolumn(integer,string)

Name Datatype
No Data

Name Datatype
ls_coltype string

public function integer of_setpicturecolumn (integer ai_level, string as_column);//////////////////////////////////////////////////////////////////////////////
//
//	Function:	of_SetPictureColumn
//
//	Access:		Public
//
//	Arguments:	
//	ai_Level		The level of the treeview to set the information for.
//	as_Column		The column in the DataWindow object to use for the picture.
//							The column may be an integer (used as the picture index) or a
//							string (a bmp name which will be used as the picture).  Or a number
//							may be passed in (i.e. "1") which will be used as the picture index
//							for all items.
//
//	Returns:		integer
//					 1 = success
//					-1 = failure
//
//	Description:
//		Sets the column name used from the datasource as the picture display
//
//		Note:  The datasource(dataobject) must be set first before calling this function
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	6.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.
//
//////////////////////////////////////////////////////////////////////////////
string	ls_coltype

// Verify that this is a valid level
If ai_Level > UpperBound(inv_attrib) Then
	Return -1
Else
	If Trim(inv_attrib[ai_Level].is_DataObject) = "" Then
		Return -1
	End If
End If

If IsNull(as_column) Then
	Return -1
End If

// Check to make sure column is valid for the dataobject
If Trim(as_column) <> "" And Not IsNumber(as_column) And &
	inv_attrib[ai_Level].ids_obj.Describe(as_column + ".Band") = "!" Then 
		Return -1
End If

inv_attrib[ai_level].is_PictureColumn = as_column

return 1
end function

     
Name Owner
No Data

     
Name Owner
datastore.describe datastore
systemfunctions.isnull systemfunctions
systemfunctions.isnumber systemfunctions
systemfunctions.trim systemfunctions
systemfunctions.upperbound systemfunctions

     
Full name
No Data

     
Name Scope
No Data