Kbase P116765: How to disable and enable toolbar buttons in a dynamic viewer
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/06/2006 |
|
Status: Unverified
GOAL:
How to disable and enable toolbar buttons in a dynamic viewer
GOAL:
How to disable and enable dynamic toolbar buttons in dynamics
FACT(s) (Environment):
Dynamics
FIX:
The following code uses two buttons to Enable and Disable the Add button on a StandardToolbar object. The code is executed from the CHOOSE event of the button and is located in the dynamic smartDataViewer super procedure.
* Procedure EnableButtons */
DEFINE VARIABLE h_toolbar AS HANDLE NO-UNDO.
DEFINE VARIABLE cActions AS CHARACTER NO-UNDO.
h_toolbar = DYNAMIC-FUNCTION ('getTableIOSource':U IN TARGET-PROCEDURE).
DYNAMIC-FUNCTION ('ModifyDisabledActions':U IN h_Toolbar, "REMOVE", 'Add').
DYNAMIC-FUNCTION ('SensitizeActions':U IN h_Toolbar, "ADD,FolderView", 'YES').
/* Procedure DisableButtons */
DEFINE VARIABLE h_toolbar AS HANDLE NO-UNDO.
DEFINE VARIABLE cActions AS CHARACTER NO-UNDO.
h_toolbar = DYNAMIC-FUNCTION ('getTableIOSource':U IN TARGET-PROCEDURE).
DYNAMIC-FUNCTION ('ModifyDisabledActions':U IN h_Toolbar, "ADD", 'Add').