ENABLE UNLESS-HIDDENALL EXCEPT fieldfield format-phrase WHEN expressionTEXT ( field format-phraseWHEN expression )constant AT n TO nBGCOLOR expressionDCOLOR expressionFGCOLOR expressionFONT expressionPFCOLOR expressionVIEW-AS TEXTSPACE ( n )SKIP ( n )IN WINDOW window frame-phraseALL EXCEPT fieldIn array fields, array elements with constant subscripts are treated just like any other field. Array fields with no subscripts or array fields in the FORM statement are expanded as though you had entered the implicit elements. See the DISPLAY statement reference entry for information on how array fields with expressions as subscripts are handled.Specifies one or more frame attributes for a field, variable, or expression. For more information on format-phrase, see the Format phrase reference entry.WHEN expressionEnables the field only if expression has a value of TRUE when the ENABLE statement is executed. Here, expression is a field name, variable name, or expression that evaluates to a LOGICAL value.constant AT n TO n BGCOLOR expression DCOLOR expression
FGCOLOR expression FONT expression PFCOLOR expression VIEW-AS TEXTSpecifies a constant (literal) value that you want displayed in the frame. If you use the AT option, n is the column in which you want to start the display. If you use the TO option, n is the column in which you want to end the display. You can use the BGCOLOR and FGCOLOR options in graphical interfaces to define the foreground and background colors to use when the constant is displayed. Similarly, you can use the DCOLOR and PFCOLOR options in character interfaces to define the prompt and display colors to use when the constant is displayed. The font option, for both character and graphical interfaces, defines the font used. If you use the VIEW-AS TEXT option, the constant is displayed as a text widget rather than a fill-in field.SPACE (n)Identifies the number (n) of blank spaces to insert after the field displays. The n can be 0. If the number of spaces you specify is more than the spaces left on the current line of the frame, the AVM starts a new line and discards any extra spaces. If you do not use this option or n, the AVM inserts one space between items in the frame.SKIP (n)Identifies the number (n) of blank lines to insert after the field is displays. The n can be 0. If you do not use this option, the AVM does not skip a line between expressions unless the expressions do not fit on one line. If you use the SKIP option, but do not specify n, or if n is 0, the AVM starts a new line unless it is already at the beginning of a new line.IN WINDOW windowSpecifies the window in which the widgets are enabled. The window parameter must be the name of a currently defined window or an expression that evaluates to the handle for a currently defined window.The frame that contains the widgets to enable. If you omit frame-phrase, the default frame for the current block is assumed. For more information on frame-phrase, see the Frame phrase reference entry.The following example enables the CustNum field and the Quit button in the main procedure. If you press GO in the CustNum field and successfully find a record, the trigger disables the CustNum field and enables the CreditLimit field and the Save and Undo buttons. If you choose Save or Undo, the CHOOSE trigger disables the buttons and enables the CustNum field again. Note that if you choose the Save button, the trigger must execute an ASSIGN statement to set the value in the underlying database field.
If you specify the ENABLE statement with field parameters, the specified fields are moved in the tab order to the end of the order specified for the original frame definition, and the tab order of each field corresponds to the order in which it is specified in the statement. The following code enables three widgets (a, b, and c) in frame A with the tab order d, e, f, a, b, and c:
DEFINE FRAME A a b c d e f.ENABLE a b c WITH FRAME A.
Note:
ENABLE a.ENABLE b.ENABLE c.
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |