DISABLE

Contents


"Disable" allows you to gray, or disable one or more command buttons and/or the menus of the menu bar.

 

Syntax

Disable  status_list

 

Parameters

Element

Description

Restrictions

status_list

status_id list separated by the comma (,)

None

status_id

Whole Number

For standard menus and buttons, use the global variables defined in the GLOBVAR process.

 

Examples

# Graying, or disabling of the CREATE and SAVE buttons and their associated menu in the
Disable "file" menu GSTACRE, GSTAENR

# Could be written (but not advised when there is a global variable globale for the status to be processed)
Disable 93, 92

# Disabling of the buttons specific to the function
Disable GSTABOU+1, GSTABOU+2

# Call of a dialog box with graying or enabling of the specific buttons
# according to a condition
Local Dlgbox Mask ABC button mess(15,198,1), mess(101,198,1)
                      coded   GSTABOU+1, GSTABOU+2       
Boxact [ABC]
If ... then
Enable GSTABOU+1, GSTABOU+2
else       
Disable GSTABOU+1, GSTABOU+2
Boxinp [ABC] using REPONS

 

Description and Comments

"Disable" allows you to gray, or disable one or more command buttons and/or the menus of the menu bar.

"Disable" is used just before entry in the dialog box.

In OBJect management, "Disable" is mainly used in the SETBOUT action.

The statuses usable by the "Disable" instruction are - for the most part - each stored in a global variable defined in the GLOBVAR process.

You can only use the SETBOUT subroutine of the GESECRAN process for certain statuses. (See the example below.)

   

Remarks

# Disabling the CREATE and SAVE buttons can also be written in the following way
# In this case, it is the SETBOUT supervisor subroutine that executes the Enable and
# Disable according to the setting to zero (0) or one (1) of the ETABOU variable of the workstations
Local Integer ETABOU(1..GNBBOU)
ETABOU (GCREE) = 0
ETABOU (GENRE) = 0
Call SETBOUT(ETABOU) From GESECRAN

# In OBJect management, in the SETBOUT action, use the subroutine of the # VIREBOUT supervisor to gray, or disable buttons and menus
# For example: Disabling of the File/Change menu of the
Call VIREBOUT(CHAINE,"H") From GOBJET code

 

Associated Keywords

EnableGrizo - Actzo - Status

 


Contents


Copyright © Sage 1999 - 2007