>>Another option is available if, for example, you have a toolbar with a NEW option on it. You can then set the SKIP FOR portion of the menu bar for new to the ENABLED status of the new buuton on the tool bar so that when you disable the toolbar button, the NEW menu option is automatically disabled as well.
>
>
>Is it automatically check for the true or false for the toolbar button? Or I have to refresh anything?
In the SKIP FOR section of the menu bar, I use the following
!FormIsObject() OR !ToolBarEnabled("Save")
where the first part is a function to see if a form exists and the second part is a function to check the form's tool bar button and is in a utility.prg that I include in my projects. The function is as follows
FUNCTION ToolBarEnabled
*- Return value of Toolbar object
PARAMETER oObject
LOCAL oToolObj
oToolObj = "oApp.oFormBar." + oobject + ".enabled"
IF TYPE(oToolObj) # "L"
RETURN .F.
ELSE
RETURN EVAL(oToolObj)
ENDIF
ENDFUNC
The parameter is the name of the toolbar button you want checked. Hope this helps.
***************************
Bruce Gilmour
"Two things are infinite, the Universe and human stupidity. And I am not sure about the Universe."
- Albert Einstein