of_setmenustatus


pfcapsrv.pbl   >   pfc_n_cst_security   >   of_setmenustatus   

Full name pfc_n_cst_security.of_setmenustatus
Access protected
Extend of integer
Return value integer
Prototype protected function integer of_setmenustatus(ref menu,string,boolean)

Name Datatype
No Data

Name Datatype
li_numset integer
ls_itemname string

protected function integer of_setmenustatus (ref menu am_item, string as_window, boolean ab_override);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  of_SetMenuStatus
//
//	Access:  protected
//
//	Arguments : a_item : menu; menu_item to be set
//					as_window : name of window that the menu is on
//					ab_override :  menu item is to be disabled and it's toolbar item 
//					(if any) is to be made invisible. This is because it's parent menu 
//					item has been set to either invisible or disabled
//
//	Returns:  Integer
//					1 = Success
//
//	Description:  Set the passed menu item,set it's status as needed and pass 
//					  back how it was set if the override flag is set then do not 
//					  even lookup the settings, but use the passed settings.
//
//////////////////////////////////////////////////////////////////////////////
//
//	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.
//
//////////////////////////////////////////////////////////////////////////////

string	ls_itemname
integer	li_numset

ls_itemname = lower(classname(am_item))

// override means that the menu item is to be disabled and it's 
// toolbar item (if any) is to be made invisible
If ab_override Then 
	If am_item.enabled Then am_item.enabled = False
	If am_item.toolbaritemvisible Then am_item.toolbaritemvisible = False
Else
	li_numset = of_SetState(as_window,ls_itemname,am_item.enabled,am_item.visible)
	If li_numset > 0 Then 
		// OK, we set something so lets do some other checks
		If Not am_item.visible Then 
			// OK, lets see if it has a toolbar and make it invisible as well
			am_item.toolbaritemvisible = False
		End If
	End If
End If

Return li_numset

end function

     
Name Owner
pfc_n_cst_security.of_setmenu pfc_n_cst_security

     
Name Owner
systemfunctions.classname systemfunctions
systemfunctions.lower systemfunctions
pfc_n_cst_security.of_setstate pfc_n_cst_security

     
Full name
No Data

     
Name Scope
No Data