of_dropdown


pfcmain.pbl   >   pfc_u_calculator   >   of_dropdown   

Full name pfc_u_calculator.of_dropdown
Access protected
Extend of integer
Return value integer
Prototype protected function integer of_dropdown()

Name Datatype
No Data

Name Datatype
li_rc Integer
li_x Integer
li_y Integer
ls_colname String
ls_coltype String

protected function integer of_dropdown ();//////////////////////////////////////////////////////////////////////////////
//
//	Function:  of_DropDown
//
//	Access:    Protected
//
//	Arguments:	None
//
//	Returns:  Integer
//		1 if it succeeds
//		-1 if an error occurs.
//		0 if the current datawindow column has not been registered.
//
//	Description:  
//		Drop Down the Object after getting the appropriate location.
//		For datawindow columns check that the current column has 
//		been registered.
//
//////////////////////////////////////////////////////////////////////////////
//
//	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.
//
//////////////////////////////////////////////////////////////////////////////
Integer 	li_rc
String	ls_colname
String	ls_coltype
Integer	li_x
Integer	li_y

// Check the required references.
If IsNull(inv_dropdown) Or Not IsValid(inv_dropdown) or &
	IsNull(idrg_requestor) or Not IsValid(idrg_requestor) Then
	Return -1
End If

// Datawindow control specific checks.
If IsValid(idw_requestor) Then
	// Get the current column name.
	ls_colname = idw_requestor.GetColumnName()

	// Check if column is in the search column array.
	If Not of_IsRegistered(ls_colname) Then
		Return 0
	End If

	// Validate that it is still an appropriate type.
	ls_coltype = idw_requestor.Describe(ls_colname+".coltype")
	If Not of_IsNumericType(ls_coltype) Then
		Return -1
	End If
End If

// Set this object on its new Position.
li_rc = inv_dropdown.of_Position(idrg_requestor, False)
If li_rc < 0 Then Return -1

// Set the current value on the calculator.
of_Reset()

// Show the object.
This.Visible = True	

Return 1

end function

     
Name Owner
pfc_u_calculator.pfc_dropdown pfc_u_calculator

     
Name Owner
datawindow.describe datawindow
datawindow.getcolumnname datawindow
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
pfc_n_cst_dropdown.of_position pfc_n_cst_dropdown
pfc_u_calculator.of_isregistered pfc_u_calculator
pfc_u_calculator.of_isnumerictype pfc_u_calculator
pfc_u_calculator.of_reset pfc_u_calculator

     
Full name
No Data

     
Name Scope
No Data