Disable
Disable
allows to disable buttons and/or links present at a bottom of a screen or on the menu bar of a function.
This function is only usable in Classic pages related code and is deprecated for code running in version 7 mode.
Disable LIST_OF_BUTTON_CODE
LIST_OF_BUTTON_CODE is a list of integer values representing buttons or links, separated by a comma. For some predefined button, global variables are usable.# Disable "Create" and "Save" actions in the "File" sub-menuDisable GSTACRE, GSTAENR# Could be written with the corresponding values (but using glbal variables is preferable in this case)Disable 93, 92# Disable buttons specific to a given functionDisable GSTABOU+1, GSTABOU+2# Let's call a dialog box and enable/disable some specific buttons# depending on a conditionLocal Dlgbox Mask ABC button mess(15,198,1), mess(101,198,1)& coded GSTABOU+1, GSTABOU+2Local Integer OKBoxact [ABC]Gosub CONDITION : # Sets OK to true or falseIf OK Then Enable GSTABOU+1, GSTABOU+2ElseDisable GSTABOU+1, GSTABOU+2EndifBoxinp [ABC] using ANSWER
Disable
is used to disable the use of buttons and/or menu items. It is used before the input in a dialog box.
In standard object management, Disable
is mostly used in the SETBOUT action, and most of the status usable with this instruction are defined with global variables.
# Let's disable the "Create" and "Save" actions (like the first example given aboveLocal Integer ETABOU(1..GNBBOU)ETABOU (GCREE) = 0ETABOU (GENRE) = 0Call SETBOUT(ETABOU) From GESECRAN