DEFINE NEW SHARED PRIVATEBROWSE browse-nameQUERY query-nameSHARE-LOCK EXCLUSIVE-LOCK NO-LOCK NO-WAITDISPLAYcolumn-list record EXCEPT fieldbrowse-enable-phrasebrowse-options-phraseCONTEXT-HELP-ID expressionDROP-TARGETTOOLTIP tooltipNEW SHARED BROWSE browse-nameSHARED BROWSE browse-namebrowse-namePRIVATE BROWSE
Note: BROWSE browse-nameQUERY query-nameSHARE-LOCK EXCLUSIVE-LOCK NO-LOCKDISPLAY column-listSpecifies the column items to display in the browse. Note that the column-list cannot contain widgets other than fill-ins (default), combo-boxes, and toggle-boxes, and the column-list cannot contain SKIP options.
DISPLAYexpressioncolumn-format-phase@ base-fieldview-as-phraseSpecifies the format for a value displayed in the browse. The column-format-phrase is a subset of the Format phrase.WIDTH nSpecify a width for the browse column. n represents a multiplier of the average character width of the column font. Specifying a width smaller than the format string creates a scrolling browse cell, if the column is updateable.For more information on FORMAT strings and label options, see the Format phrase reference entry. The column and label color and font options work like those specified in the browse-options-phrase. If color or fonts are specified with this phrase, they only affect the specific column and override similar options specified in the browse-options-phrase.@base-fieldThe base-field must be the name of a field or variable; it cannot be an expression or constant.The AVM reserves enough space for the base-field to hold the longest format displayed there. All right-justified fields (numeric fields that do not use side labels) are right justified within the reserved area.To determine the format to use for displaying the expression at the base-field, the AVM looks at the following and uses the first format that applies:
An explicit format used with the expression.
Specifies the type of widget to use for displaying values in the browse column. This is the view-as-phrase syntax, which is a subset of the VIEW-AS phrase:
VIEW-AS combo-box-phrase TOGGLE-BOXIf you do not specify a view-as-phrase, the widget type for the browse column will be a FILL-IN, by default.For more information, see the VIEW-AS phrase reference entry.DISPLAY recordSee the Record phrase reference entry for more information.EXCEPT field . . .Specifies which fields in the column-list are enabled for input.
ENABLEfield HELP stringVALIDATE ( condition , msg-exp )AUTO-RETURNDISABLE-AUTO-ZAPALL EXCEPT fieldList each field or variable from the column-list that you want enabled. Specify ALL to specify every item in the column-list. Use the EXCEPT option to exclude specific items when you use the ALL option.HELP stringSpecifies an expression against which you want to validate the data entered in a browse cell. The condition is a Boolean expression (a constant, field name, variable name, or expression) whose value is TRUE or FALSE.When you use the VALIDATE option to validate a specific cell, any reference to that cell in condition is assumed to be the new input value. For example, in the browse-enable phrase below, the PromiseDate that is compared to the OrderDate is the new user input, not the existing data:
ENABLE PromiseDate VALIDATE(PromiseDate > OrderDate,"Promise date must be later than order date").
ENABLE OrderDate PromiseDate VALIDATE(PromiseDate > INPUT OrderDate,"Promise date must be later than order date").If the value of condition is FALSE, use msg-expression to display a specific message. You must enclose msg-expression in quotation marks ("").The AVM processes validation criteria whenever the user attempts to leave the browse cell. If the cell value is not valid, the AVM displays msg-expression in the message area, causes the terminal to beep, and does not advance out of the browse cell.If the user tabs to a cell, makes no changes, and leaves the cell, the AVM does not process the validation criteria specified with the VALIDATE option until you press GO (F1). If the user presses ENDKEY or END-ERROR, or an error occurs, the AVM does not test the validation criteria specified with the VALIDATE option.If the input source for the procedure is a table, the AVM validates each input field (except those with a value of "-"). If the result of the validation is FALSE, msg-expression is displayed and the AVM treats the validation as an error.
VALIDATE(TRUE,"")Indicates whether the AVM behaves as if the user pressed the RETURN key when the user enters the last allowable character in a browse cell of the specified browse column.
WITHconstant DOWN WIDTH width size-phraseFGCOLOR expressionBGCOLOR expressionDCOLOR expressionPFCOLOR expressionLABEL-FONT expressionLABEL-DCOLOR expressionLABEL-FGCOLOR expressionLABEL-BGCOLOR expressionMULTIPLE SINGLESEPARATORS NO-SEPARATORSNO-ASSIGNNO-ROW-MARKERSNO-LABELSNO-BOXFONT constanttitle-phraseNO-VALIDATENO-SCROLLBAR-VERTICAL SCROLLBAR-VERTICALROW-HEIGHT-CHARS ROW-HEIGHT-PIXELS row-heightFIT-LAST-COLUMNEXPANDABLENO-EMPTY-SPACEDROP-TARGETNO-AUTO-VALIDATEconstant DOWN WIDTH widthThe constant value is the number of rows displayed in the browse and must be at least 2. You can optionally specify the width of the browse, where width is the width of the browse in character units.
width BY heightSIZE SIZE-PIXELSA browse-options-phrase must contain a DOWN option (optionally with a WIDTH option) or a size-phrase.FGCOLOR expressionSpecifies the foreground color for the browse in graphical environments, but not the label foreground color. The value of expression must be an integer value that specifies an entry in the color table. This option is ignored in character environments.BGCOLOR expressionSpecifies the background color for the browse in graphical environments. The value of expression must be an integer value that specifies an entry in the color table. This option is ignored in character environments.DCOLOR expressionSpecifies the display color for the browse in character environments. The value of expression must be an integer value that specifies an entry in the color table. This option is ignored in graphical environments.PFCOLOR expressionSpecifies the prompt color for the browse in character environments. The value of expression must be an integer value that specifies an entry in the color table. This option is ignored in graphical environments.LABEL-FONT constantLABEL-DCOLOR expressionSpecifies the display color for the browse labels in character environments. The value of expression must be an integer value that specifies an entry in the color table. This option is ignored in graphical environments.LABEL-FGCOLOR expressionSpecifies the foreground color for the browse labels in graphical environments. The value of expression must be an integer value that specifies an entry in the color table. This option is ignored in character environments.LABEL-BGCOLOR expressionSpecifies the background color for the browse labels in graphical environments. The value of expression must be an integer value that specifies an entry in the color table. This option is ignored in character environments.MULTIPLE SINGLESEPARATORS NO-SEPARATORS
ASSIGNNamea = bINPUT FRAME my-frame c dINPUT BROWSE my-browse order-date promise-dateINPUT e.FONT constant
TITLE DCOLOR expression title-stringThe title-string is a constant, field name, variable name, or expression whose result is a character value. The expression is the value you want to display as a title. If title-string is a constant character string, it must be surrounded by quotes (""). The AVM automatically centers title-string in the top line of the browse box.NO-SCROLLBAR-VERTICAL SCROLLBAR-VERTICALROW-HEIGHT-CHARS ROW-HEIGHT-PIXELS row-heightCONTEXT-HELP-ID expressionTOOLTIP tooltipIf TOOLTIP is set to "" or the Unknown value (?), then the ToolTip is removed from the browse. No ToolTip is the default. ToolTips are supported in Windows only.This procedure sets up a read-only browse widget for the Customer table. The browse displays the CustNum and Name fields. A separate frame, f2, displays more information on the currently chosen Customer.
You cannot define a SHARED or NEW SHARED browse widget in a class definition (.cls) file. If you do, ABL generates a compilation error.
DISPLAY field value @ fieldWITH BROWSE browse
You can specify an application-defined widget ID for a compile-time defined browse widget using the form-item phrase in either the FORM statement or the DEFINE FRAME statement. See the FORM statement and DEFINE FRAME statement reference entries for more information.
To select more than one row in a browse widget, press CTRL and then click on the rows you want to select.
The browse’s QUERY attribute can now be set to the Unknown value (?). If this is done, all browse columns are removed.ADD-CALC-COLUMN( ) method, ADD-COLUMNS-FROM( ) method, ADD-LIKE-COLUMN( ) method, Class-based data member access, CLOSE QUERY statement, CREATE BROWSE statement, CURRENT-CHANGED function, CURRENT-RESULT-ROW function, DEFINE QUERY statement, DISPLAY statement, FIND statement, FORM statement, Format phrase, Frame phrase, GET statement, NUM-RESULTS function, OPEN QUERY statement, RUN statement
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |