of_SetDropDownCalendar


pfcmain.pbl   >   pfc_u_dw   >   of_SetDropDownCalendar   

Full name pfc_u_dw.of_SetDropDownCalendar
Access public
Extend of integer
Return value integer
Prototype public function integer of_SetDropDownCalendar(boolean)

Name Datatype
No Data

Name Datatype
lnv_calendarattrib n_cst_calendarattrib
lpo_message powerobject
ls_classname string
lw_parent window

public function integer of_SetDropDownCalendar (boolean ab_switch);//////////////////////////////////////////////////////////////////////////////
//	Public Function:  of_SetDropDownCalendar
//	Arguments:		boolean
//   					true  - Start (create) the service
//   					false - Stop (destroy ) the service
//	Returns:			Integer - 1 if Successful operation, 0 = No action taken and -1 if an error occured
//	Description:	Starts or stops the DropDown Calendar visual object.
//////////////////////////////////////////////////////////////////////////////
//	Rev. History	Version
//						6.0   Initial version
// 					6.0.01 Enhanced so that the Message object is not overwritten by the 
//								 OpenUserObject function.
//////////////////////////////////////////////////////////////////////////////
//	Copyright © 1996-1999 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.
//////////////////////////////////////////////////////////////////////////////
window lw_parent
string	ls_classname
powerobject	lpo_message
n_cst_calendarattrib lnv_calendarattrib

// Check arguments
if IsNull(ab_switch) then return FAILURE

// Get parent window reference.
of_GetParentWindow(lw_parent)
if IsNull(lw_parent) or not IsValid(lw_parent) then return FAILURE

if ab_Switch then
	if not IsValid (iuo_Calendar) then
		// If using pfc_n_msg, store the Message Object (dynamic call).
		if IsValid(message) then
			ls_classname = Trim(Lower(message.ClassName()))
			if ls_classname = "n_msg" then lpo_message = Create Using "n_msg"
			if IsValid(lpo_message) then message.Dynamic of_CopyTo(lpo_message)
		end if				
		
		// Tell the object to behave as a dropdown object.
		lnv_calendarattrib.ib_dropdown = true
		lw_parent.OpenUserObjectWithParm(iuo_Calendar, lnv_calendarattrib)
		iuo_Calendar.of_SetRequestor (this)
		
		// If using pfc_n_msg, restore the Message Object (dynamic call).
		if IsValid(lpo_message) then 
			lpo_message.Dynamic of_CopyTo(message)
			Destroy lpo_message
		end if
		return SUCCESS
	end if
else 
	if IsValid (iuo_Calendar) then
		lw_parent.CloseUserObject(iuo_Calendar)
		return SUCCESS
	end if	
end if 

return NO_ACTION
end function

     
Name Owner
w_resp_employee.dw_master.constructor dw_master
w_sheet_sales_order.dw_master.constructor dw_master
w_resp_sales_order.dw_master.constructor dw_master
w_resp_salesperson.dw_view.constructor dw_view
w_resp_salesperson.dw_master.constructor dw_master
pfc_u_dw.destructor pfc_u_dw
pfc_u_tabpg_dwproperty_services.pfc_propertyapplyimmediate pfc_u_tabpg_dwproperty_services

     
Name Owner
powerobject.classname powerobject
window.closeuserobject window
window.openuserobjectwithparm window
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
systemfunctions.lower systemfunctions
systemfunctions.trim systemfunctions
pfc_u_calendar.of_setrequestor pfc_u_calendar
pfc_u_dw.of_GetParentWindow pfc_u_dw
pfc_n_msg.of_copyto pfc_n_msg

     
Full name
demopfc

     
Name Scope
No Data