pfc_propertyenablebuttons


pfcutil.pbl   >   pfc_u_tabpg_dwproperty_services   >   pfc_propertyenablebuttons   

Full name pfc_u_tabpg_dwproperty_services.pfc_propertyenablebuttons
Access public
Extend of integer
Return value integer
Prototype event integer pfc_propertyenablebuttons()

Name Datatype
No Data

Name Datatype
ll_currentrow long
ls_pages string

event pfc_propertyenablebuttons;call super::pfc_propertyenablebuttons;//////////////////////////////////////////////////////////////////////////////
//
//	Event:  pfc_PropertyEnableButtons
//
//	Arguments: None
//
//	Return:	integer
//	 1 if it succeeds.
// -1 error.
//
//	Description: 
//	As appropriate, Enable or Disable the buttons.
//	
//////////////////////////////////////////////////////////////////////////////
//	
//	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.
//
//////////////////////////////////////////////////////////////////////////////

long		ll_currentrow
string	ls_pages

// Get the current row.
ll_currentrow = dw_services.GetRow()
If ll_currentrow <= 0 Then
	// Disable all buttons.
	cb_disable.Enabled = False
	cb_enable.Enabled = False
	cb_property.Enabled = False
	Return -1
End If

// As appropriate, Enable or Disable the Switch buttons.	
If Upper(dw_services.Object.serviceswitchbuttons.Primary[ll_currentrow]) = 'Y' Then
	If dw_services.Object.serviceenabled.Primary[ll_currentrow] = SERVICE_ENABLED Then
		cb_disable.Enabled = True
		cb_enable.Enabled = False			
	Else
		cb_disable.Enabled = False		
		cb_enable.Enabled = True			
	End If
Else
	// Note: The datawindow itemchanged will also prevent the switch.
	cb_disable.Enabled = False		
	cb_enable.Enabled = False			
End If

// As appropriate, Enable or Disable the Property button.
If dw_services.Object.serviceenabled.Primary[ll_currentrow] = SERVICE_ENABLED Then
	ls_pages = Trim(dw_services.Object.servicepropertypages.Primary[ll_currentrow])
	cb_property.Enabled = (Len(ls_pages) > 0)
Else
	cb_property.Enabled = False
End If

Return 1
end event

     
Name Owner
pfc_u_tabpg_dwproperty_services.dw_services.itemchanged dw_services
pfc_u_tabpg_dwproperty_services.dw_services.rowfocuschanged dw_services
pfc_u_tabpg_dwproperty_services.cb_enable.clicked cb_enable
pfc_u_tabpg_dwproperty_services.cb_disable.clicked cb_disable
pfc_u_tabpg_dwproperty_services.pfc_propertypopulate pfc_u_tabpg_dwproperty_services

     
Name Owner
datawindow.getrow datawindow
systemfunctions.len systemfunctions
systemfunctions.trim systemfunctions
systemfunctions.upper systemfunctions

     
Full name
pfc_u_tabpg_dwproperty_services

     
Name Scope
No Data