Field WdgCallbacks

The callback events an object can raise.

Valid Values

An integer code combining the following values:

Code

Meaning

0

No callback events are raised.

1

When the object is modified (MODIFIED).

2

When a click is applied to the object (CLICK).

4

When a double-click is applied to the object (DOUBLECLICK).

8

When a right-click is applied to the object (RIGHTCLICK).

16

When an ActiveX object raises a callback event (ACTIVEX).

32

When a click occurs on the header of the object (HEADER).

64

When the object gets the focus (GOTFOCUS).

128

When the object loses focus (LOSTFOCUS).

256

When the object loses focus after being modified (LOSTFOCUSMODIFIED).

Remarks

Only resizable windows can have menus.

Example: If the object has to raise a GotFocus event and a Click event, the WdgCallbacks would contain (2 + 64) = 66.

Functional Expressions

About Functional Expressions

The software provides a host of built-in functions that process given arguments in a variety of ways. An expression consisting of a function and its arguments (typically, value expressions) is called a functional expression.

Examples of functional expressions are

$length(‘Smith’)Evaluates to 5
$cos(0)Evaluates to 1
$log10(2*50)Evaluates to 2
$year(19990923)Evaluates to 1999
$maxof($absolute(-10),4+5)Evaluates to 10

General Performance

Functions are a special class of operator, but they perform much like arithmetic operators; they take one or more given values, perform an operation using those values, and return a result. The value of the result depends on the function.

The function’s arguments are similar to the arithmetic operands. Like arithmetic operands, the arguments can consist of literals or value expressions, including other functional and arithmetic expressions as shown in the following example:

$absolute(-7)

The functional expression shown above consists of the argument -7 and the function keyword $absolute. The function $absolute returns the absolute (i.e., unsigned) value of its argument (in this case, 7).

Complex Arguments

If the argument is a complex expression, the argument is evaluated before the function is applied. For example, in the expression

$absolute(6-11)

the arithmetic expression 6-11 is evaluated first, yielding $absolute(-5). Then the final result (5) is determined.

Functional expressions can act as arguments to other functions. For example, the expression

$toupper($substring(‘abcdef’,2,3))

evaluates to

$toupper(‘bcd’)

which in turn evaluates to

‘BCD’

Data Type of Arguments and Results

Each function expects arguments of a certain data type; however, the function accepts arguments of any data type and appropriately converts any argument that does not conform to the expected type.

Character Literals

A character literal is any string of characters enclosed in quotation marks as shown in the following example:
‘This is a character string.’
“This is a character string, too.”
For convenience, you can enter character literals without the delimiting quotation marks; however, quotation marks are required in some situations. The rules for using quotation marks are described in Quotation Marks.
Valid and Invalid Literals
The following are examples of valid literals:
‘abc’
Is a character string.
‘ab”C’
Is a character string.

Is a null string.
3.14159
Is a number literal.
9
Is a number literal.
‘10.99’
Is a character string.
‘John\’s toy boat’
Is a character string.
‘ABCd_EfG’
Is a character string.
‘1234A’
Is a character string.
The following are examples of invalid literals:
1 23
Spaces are not permitted in number literals.
$10.99
Periods are not permitted in an unquoted character string, and the dollar sign is not permitted in a number literal.
‘John’s toy boat’
‘John’ is a valid character string, but the rest of the line is invalid.

Callback Events

Callback Events

“callback event” (or simply an “event”) is an interaction, between the end-user and the application interface, that causes a FORM INPUT or MENU INPUT command to terminate, and control to pass the next command in the executing program.
There are two types of potential events that can occur: object dependent and object independent.

Event TypeDescription
Object IndependentEstablished by the Zim language commands FORM SET TRANSMIT and FORM SET EXIT. These event types are independent of the objects (such as Form FieldsMenu Items, etc.) presented in the application’s user interface
Object DependentAssociated with one or more objects within a specific user interface presentation. In the context of designing user interface objects with ZimIDE, only object-dependent events are relevant. Different object types support different subsets of the available set of object-dependent events. For example, a Picture object cannot have its associated data modified by end-user interaction.

The available set of object dependent event types are:

Object Dependent EventDescriptionEvent.Name value in Event Vector
Got FocusCaused by an object gaining the focus by any means“GotFocus”
Lost Focus (Always)Caused by an object losing the focus by any means“LostFocus”
Lost Focus (Modified)Caused by an object losing the focus by any means after its associated data has been modified. *“LostFocusModified”
ModifiedCaused by the modification, by any means, of the data associated to an object. *“Modified”
ClickCaused by a mouse click on an object“Click”
Double-ClickCaused by a double mouse click on an object“DoubleClick”
Right-ClickCaused by a right mouse click on an object. For more information, see  RightClick“RightClick”
ClosedApplicable only to Window object that have a system menu with an active Close option. It is associated with either a double mouse click on the window’s system menu or the selection (by some means) of the window’s system menu Close option.“Closed”
BackAndroid only: Caused by a click on the back button on Android devices.“Back”
* Not applicable to object types that either have no associated data (e.g. a Window object), or whose associated data cannot be modified (e.g. Picture form field object)

In ZimIDE, the CallBackEvents set of properties enables the selection of event types that can be made active for a particular object.
The dialog presents only those event types which the object type can support.
Note that menu items that do not have any child menu items support only the Click event, and they are always active for that event type.
When an event is made active for an object, the occurrence of that event causes either a FORM INPUT or a MENU INPUT command to terminate and execution control to pass to the next command in the executing program. In addition, the Event Vector Event is populated with information describing the event (cf. Event Vector).
The event properties NameType, and Tag are of particular importance for program execution control.

Event PropertyDescription
NameThe name of the event, as shown in the previous table: “GotFocus”“LostFocus”“LotFocusModified”“Modified”“Click”“DoubleClick”“RightClick”“Closed” or “Back”,
TypeThe type of object that caused the event: “Window”“FormField” or “MenuItem”.
TagThe tag associated with the object that caused the event. If blank, the object’s Name is placed in the Tag field of the Event Vector Event

Mask

The Purpose of Masking Patterns

Masking patterns are used to format data values in a manner appropriate to the type of information they represent.

For example, in Zim, dates are stored as a special type of numerical value, in which the first four digits represent the year, the next two represent the month and the last two stand for the day.

As such, the date June 28, 2014 is stored numerically as 20140628. This allows for mathematical operations to be performed on dates, but this format is not intuitive for presentation.

By using a masking pattern, such as “DD/MM/YYYY”, this date value will now be presented as the string “28/06/2014”, which is instantly recognized as a date.

The same masking pattern is also used to format the input of data into a date entry field. Instead of typing 20140628, the end-user can type 28062014, because the separator character / is only presented between the year, month and day values, but is not actually part of the date value itself.

The same principle can be applied to separator characters in currency values, postal codes, phone numbers, etc.

Situations in Which Masking Patterns Are Used

Zim offers the possibility of applying data masking patterns in different situations, each with a specific set of fixed and masking characters, as summarized in the table below (follow the links in the first columns for more information):

MaskingDefinined asPurposeRemarks
Data MaskEntry field property
(DataMask)
Input
Display
  • Defines the expected format of the data value while it is being typed
  • Displayed as the mask pattern before any data is entered into an entry field
  • Formats the display of a data values after it is typed into an entry field
Field MaskField property
(FieldMask)
Zim Reports
list
output
  • Defines the expected format of the field’s data value when it is printed or listed in Zim Reports,
    or by the list or output commands
MASKFormat option i n
Zim Reports
Zim Reports
  • Defines the expected format of the field’s data value when it is printed or listed in Zim Reports
  • When used, overrides the FieldMask property of all fields
$maskFunctionlist
output
  • Defines the expected format of a field or a data value when printed or listed by the list or output commands
  • When applied to a field, overrides its FieldMask property

Masking Characters According to Data Types

The set of available masking characters is different according to the Data Type property (DT) of the entity set field or the entry field.

The following sections describe the available masking characters for each data type:

Alphanumeric Masking

Alphanumeric masking is used to format generic text data. It is particularly useful when data is entered in shortened form but displayed in full form.

In the output value, each question mark is replaced by one character from the current value of the report item, in order from left to right.

When no more characters remain in the value, any remaining question marks become spaces.

Alphanumeric Masking Characters

Masking CharacterPurposeDataMaskFieldMaskMASK$mask
?Placeholder for any alphanumeric character✔✔✔✔
\?the question mark character ?✔✔
Displayed as is✔✔✔✔

Examples

 

Field Mask      MASK      $mask

Leading or trailing spaces are indicated by / in the Output column.

Mask PatternField ValuePrinted, Listed or Reported Data Value
‘?epartment ??’D04Department 04
‘SIN no.: ???-???-???’987654321SIN no.: 987-654-321
‘Part No \?xyz???\?466Part No ?xyz466?
‘???’ABCDABC
‘????’ABCABC/

Data Mask

Mask Pattern PresentedTyped DataStored Entry Field ValueDisplayed Data
???ABCABC
(???) ???-????2123459786(212) 345-9786
?epartment ??D01Department 01
?epartment ??D01 abcDepartment 01 abc

Note:

If the CM (compress status) attribute of a form field is N, the value of the form field is the same as the displayed data. Otherwise, the value of the form field is the same as the input data vlue.

lf the mask pattern is shorter than the field length, then the mask is assumed to contain ? characters in the missing positions (See the last example above).

Non-Digit Masking

Non-digit mask patterns are nearly identical to alphanumeric ones, with the exception that digits (0, 1, …, 9) are not accepted as valid input.

Date Masking

Date masks are composed of three types of character groups, representing the year, month and day, which can be combined in any order.

Between each group there may be an optional fixed separator character, such as /, , ., or blank space, which appear in the display or output as is.

For date entry fields, the default masking pattern is MM/DD/YY.

Date Masking Characters

Masking CharacterPurposeDataMaskFieldMaskMASK$mask
DDPlaceholder for the day (2 digits)✔✔✔✔
MMPlaceholder for the month (2 digits)✔✔✔✔
YYPlaceholder for the year (2 digits)✔✔✔✔
YYYYPlaceholder for the year (4 digits)✔✔✔✔
Represents a fixed separator character, usually /, , ., or blank space✔✔✔✔

Examples

 

Field Mask      MASK      $mask

Leading or trailing spaces are indicated by / in the Output column.

Mask PatternEntity Set Field ValuePrinted, Listed or Reported Data Value
DD/MM/YY1999081818/08/99
YYYY-MM-DD199908181999-08-18
MM DD YYYY1999081808 18 1999

Data Mask

Mask Pattern PresentedTyped DataStored Entry Field ValueDisplayed Data
MM/DD/YYYY052314921492052305/23/1492
YYYY-MM-DD14920523149205231492-05-23
YY/MM/DD9105231991052391/05/23
DD-MM-YY2305911991052323-05-91
MM/DD/YY0523911991052305/23/91

Numeric Masking

 

When the data item contains decimals, the decimal point in the mask pattern is aligned with the decimal point in the value, and digit substitutions are made from right to left for the mask characters to the left of the decimal point, and from left to right for the mask characters to the right of the decimal point.

A series of 9s can therefore be used to force the printing of non-significant zeros to the right of the decimal point (in dollar values, for example). A 9 would also be used to force the printing of leading zeros in serial numbers: for example, 009876.

Any report item whose current value is too large to fit in the specified mask pattern (including the sign output, if applicable) causes the overflow characters (asterisks) to be displayed.

  • the currency placeholder ($) and sign placeholders: plus (+), minus (), left and right parentheses (( and )), and the special character strings CR and DB

The currency placeholder inserts the applicable currency symbol into the output value.

Sign placeholders reflect the sign of the number (positive or negative) in the output value. The left parenthesis can be used only on the left-hand side of the mask pattern. The CR, DB and left and right parenthesis can be used only on the right-hand side of the mask pattern. The plus and minus signs can be used on either side of the mask pattern.

The plus and minus signs, left parenthesis, and the dollar sign can be used as float characters. A single plus, minus, dollar sign, or left parenthesis can also “float” ahead of a series of other floating characters.

  • fixed text characters

Typically, in the output value, fixed text characters (e.g., commas) appear as is, provided that there are digits remaining to be substituted into the mask or that the mask character 9 forces the output of zeros.

Numeric Masking Characters

Masking CharacterPurposeDataMaskFieldMaskMASK$mask
9Replaced by a digit when matched in the input or 0 when unmatched✔✔✔✔
ZReplaced by a digit when matched in the input or a blank space when unmatched✔✔✔✔
*Replaced by a digit when matched in the input or * when unmatched✔✔✔✔
$Replaced by the currency symbol as defined in zimlang.zim✔✔✔✔
.Placeholder for the decimal point as defined in zimlang.zim✔✔✔✔
,Placeholder for the comma as defined in zimlang.zim✔✔✔✔
+Placeholder for the + (plus) sign✔✔✔✔
Placeholder for the – (minus) sign✔✔✔✔
CRPlaceholder for the CR (credit) symbol, as defined in zimlang.zim✔✔✔✔
DBPlaceholder for the DB (debit) symbol, as defined in zimlang.zim✔✔✔✔
(Represents ( to the left of negative values, instead of the negative sign “✔✔✔
)Represents ) to the right of negative values, instead of the negative sign “✔✔✔
Displayed as is✔✔✔✔

Examples

 

Field Mask      MASK      $mask

Leading or trailing spaces are indicated by / in the Output column.

Mask PatternEntity Set Field ValuePrinted, Listed or Reported Data Value
‘9,999,999’78506067,850,606
‘9,999,999’785060,078,506
‘*,***,***’78506067,850,606
‘*,***,***’78506***78,506
‘Z,ZZZ,ZZZ’78506067,850,606
‘Z,ZZZ,ZZZ’78506///78,506

Data Mask

Mask Pattern PresentedTyped DataStored Entry Field ValueDisplayed Data
99991231230123
999.912312.3012.3
ZZZZ123123123
ZZZ.Z12312.312.3
ZZZ,ZZZ.ZZ-123456-1234.56-1,234.56
$$$,$$$.$$ CR-123456-1234.56$1,234.56 CR

WINDOW OPEN

Opens a window for use in subsequent window-handling commands.

Syntax

WINDOW OPEN [window] [AT position] [SIZE winsize] [FOR form] [IN parent]

Parameters

windowWindow can be:
name

The name of the window that you want to open. Zim looks up the name in the currently accessed directories in the usual way. A compiled WINDOW OPEN command using name contains the unambiguous name of the window (including a reference to an application directory) that was found at compile time.
(expr)

A character string or an expression that evaluates to a character string that is to be used at run time as the name of the window. The parentheses must be entered. A compiled WINDOW OPEN command using (expr) can refer to many windows, at the risk of encountering an ambiguous window name (i.e., no directory specified when versions of the window are available in two or more directories).
WINDOW OPEN cannot be used to open a window defined in a foreign directory.
positionPosition can be:
row col

Numbers or expressions that evaluate to numbers. Complex expressions must be enclosed in parentheses.
Specify the location of the window by explicitly setting the row and column in pixels for the upper left-hand corner of the window.
position

Specifies the position of the window by giving a general placement instruction. Can be TOP, TOP LEFT, TOP RIGHT, CENTER, LEFT, RIGHT, BOTTOM, BOTTOM LEFT, or BOTTOM RIGHT.
For pop-up windows, the specified location is relative to the screen. For clipped windows, the location is relative to the client area of the parent window.
winsizeSize can be:
height width

Numbers, or expressions that evaluate to numbers. Height identifies the height, in pixels, of the window’s client area; width identifies the width, in pixels, of the window’s client area.
MAXIMIZE

Opens a clipped window so that it fills the client area of parentwin, or a pop-up window so that it fills the screen.
MINIMIZE

Opens a clipped window so that it appears as an icon near the bottom, left-hand corner of parentwin, or a pop-up window so that it appears as an icon near the bottom left-hand corner of the screen.
formForm is the name of a form or display on which the logical dimensions of the window are based. Can be:
formname

Where formname is a form (or display) object name. The software looks up formname in the currently accessed directories in the usual way. A compiled WINDOW OPEN command using formname contains the unambiguous name of the form (including a reference to an application directory) that was found at compile time.
(expr)

A character string, or an expression that evaluates to a character string, that is to be used at run time as a form object name. The parentheses must be entered.
The name of the form is determined at run time. A compiled WINDOW OPEN command using (expr) can refer to many forms, at the risk of encountering an ambiguous form name (i.e., no directory specified when versions of the form are available in two or more directories).
The FOR clause overrides the default logical dimensions of the window object.
parentParent is the name of an open window that is to be the parent of the window being opened. The child window must have the attribute Clipped To Parent set. Can be:
name

The name of the parent window. The software looks up name in the currently accessed directories in the usual way. A compiled WINDOW OPEN command using name contains the unambiguous name of the window (including a reference to an application directory) that was found at compile time.
(expr)

A character string, or an expression that evaluates to a character string, that is to be used at run time as the name of the parent window. The parentheses must be entered.
A compiled WINDOW OPEN command using (expr) can refer to many windows, at the risk of encountering an ambiguous window name (i.e., no directory specified when versions of the window are available in two or more directories).

Comments

WINDOW OPEN opens the specified window and establishes its initial position and its physical and logical dimensions.

The window being OPENed becomes the current window, but it does not automatically appear on the screen. To appear on the screen, the window must be activated either explicitly by a WINDOW ACTIVATE command, or implicitly by an input request (e.g., FORM INPUT, INPUT, MENU INPUT).

WINDOW OPEN makes the window available for output. Forms can be open and displayed in the window, and output from commands such as REPORT FROM, LIST, OUTPUT, and so on, can be sent to the window. The output appears only when the window is activated.

If the AT clause is omitted, the window appears at the position defined for it in the Object Dictionary.

A window’s position is always relative to its physical parent. The physical parent of a clipped window is another window (parentwin). The physical parent of a pop-up window is the terminal.

If the arguments to the AT clause are such that the window opens out of bounds, the position is adjusted automatically so that the window remains entirely within the parent’s boundaries.

If the SIZE clause is omitted, the dimensions of the window’s client area are determined from the window’s definition in the Object Dictionary.

If either dimension in a SIZE clause is negative, the window is sized to maximize the associated dimension within parentwin with respect to the specified row and col position.

If the FOR clause is omitted, the logical dimensions of the window are determined from the window’s definition in the Object Dictionary.

If the IN clause is omitted, the newly opened window automatically becomes a “child” of the application window (BACKSCREEN).

The IN clause tells Zim to clip the window being opened to the parent, provided that the child window has the Clipped to Parent attribute set. Otherwise, the child window will be opened as usual.

WINDOW OPEN [re]sets the fields of the ThisWindow system variable.

See Also

$iswinopen

ThisWindow

WINDOW ACTIVATE

WINDOW CLEAR

WINDOW CLOSE

WINDOW DEACTIVATE

WINDOW DISPLAY

WINDOW SCROLL

WINDOW SET

WINDOW SIZE

CASE

Enables conditional execution of commands.

Syntax

CASE

WHEN expression

commands1

[OTHERWISE

commands2]

ENDCASE

Parameters

expressionA logical expression (using conditional or Boolean operators).
commands1Commands that are executed if expression is logically true.
commands2Commands that are executed if expression is logically false.

Comments

A CASE command must always have a corresponding ENDCASE. Any number of WHEN clauses can appear between CASE and ENDCASE.

The WHEN phrases between CASE and ENDCASE are evaluated in order. Execution control transfers to the commands associated with the first WHEN clause whose expression is determined to be logically true. If none of the WHEN phrases contain an expression that evaluates to “true”, the commands associated with OTHERWISE (if used) are executed. Execution then resumes at the first command following ENDCASE.

If a WHEN expression includes fields from the current set, then the expression uses the values found in the current member of the current set.

If a BYE, RETURN, STOP, or TRANSFORM command exits a procedure in the middle of a CASE structure, the “open” CASE command is automatically closed. Also, if the end of the current procedure is reached before a necessary ENDCASE is encountered, the “open” CASE command is closed.

If the ENDCASE is missing, all subsequent commands in the current procedure are treated as part of the CASE structure.

Example

If the value for salary is neither less than 20,000, nor between 20,00 and 30,000, the first and second set of commands are skipped, and the third set of commands executed.

case

when salary < 20000

… first set of commands …

when Salary between 20000 and 20000

… second set of commands …

otherwise

… third set of commands …

endcase

The following program fragment illustrates how WHEN conditions in a CASE command can handle an application user’s choice of accelerator keys in an application. Depending on the key pressed by the application user, a particular procedure is executed.

form display input

case

when Event.EventName = “F3”

return

when Event.EventName = “F1”

AddNewRecord ()

when Event.EventName = “F2”

ChangeRecord ()

when Event.EventName = “F4”

DeleteRecord()

otherwise

GiveHelp ()

endcase

FORM OPEN

Opens a form or display in the current window.

Syntax

FORM OPEN [object][ NOCLEAR][ NOGUIUSE]

Parameters

objectname: The name of the form or display to be opened.

(expr): A character string, or an expression that evaluates to a character string, to be used at run time as the name of the form or display.
Using (expr) enables one FORM OPEN command to specify different forms or displays, at the risk of encountering an ambiguous name.

FORM OPEN (expr) cannot be used to open forms defined in a foreign directory.

NOCLEARThe values currently assigned to the constituent form fields are to be retained.
If omitted, each form field value is reset to its default.
NOGUIUSEThe current form or display is opened for internal use only and is never displayed.
It is intended for the performance improvement whenever forms are used as arrays in memory.
Any attempt to display these objects will be ignored.
Other operations are accepted as usual.

Comments

The FORM OPEN command initializes a form or display for use.
The form or display is displayed using the FORM DISPLAY command, and input is requested using the FORM INPUT command.

The form or display specified in a FORM OPEN command remains the current form in its window until a FORM OPEN, FORM CLOSE, or WINDOW CLOSE command is executed.
Each window has its own current form.

When a FORM OPEN command is executed, all ,em>form field attributes are reset to their defined values.
An exception is the field’s value, which is not reset if the NOCLEAR option is used.

The FORM OPEN command also establishes a form for use as an in-memory EntitySet.
When treated as an EntitySet, a standalone form has only one record.
The forms in a display have as many records as there are instances of a particular form in the display.

Examples

form open dAddEmps

Opens a display and resets all constituent form fields to their default values.

form open fAddEmps
form display input
form close
:
form open fAddDepts
form display
close
:
form open fAddEmps noclear
form display

Opens a form and resets its field values, then displays the form and requests user input. Next, a second form is opened and displayed.
Finally, the first form is opened again, and the field values input earlier are re-displayed (because the NOCLEAR option was specified).

form open ($ concat(" fContracts", ContractType))

Opens a certain form dynamically by type.

See Also

FORM CLEAR

FORM CLOSE

FORM SET

FORM DISPLAY

Displays some or all of the form fields of the currently open form or display in the current window.

Syntax

FORM DISPLAY [ option ] [ object ]

Parameters

optionCan be
BELL
Sounds the terminal bell when the FORM DISPLAY command is executed. On older machines, the PC bell is rung. Newer machines must be equipped with a sound card and speakers in order for you to hear the bell.
INPUT
Shifts focus to the form and puts the application user in control of the interface after the FORM DISPLAY command is executed.
NOCLEAR
Prevents the contents of the window from being cleared before the FORM DISPLAY is carried out. Otherwise, the current window is cleared automatically.
NOLABEL
Prevents the contents of the current window from being cleared, and displays all specified fields that contain a visible value.
NOVAR
Prevents the contents of the current window from being cleared, and displays all specified fields that have no visible value.
PURGE
Specifies unprocessed input received before the form was displayed is to be ignored. Eliminates the possible effects of inadvertent keystrokes or mouse actions.
objectCan be
form
The name of the currently open form or display. Specify a particular instance of a form in brackets beside the object’s name.
formfield
The name of a particular form field within the currently open form or display. Specify a particular instance of a form field in brackets beside the form field’s name.
([exp1 ],[exp2 ],[exp3 ])
Positive integers or expressions that evaluate to positive integers, that identify a particular form or form field. Exp1 identifies the form number; exp2, the field number; exp3, the instance of the form or form field in the display. At a minimum, either exp1 or exp2 must be specified.

Comments

The current window must be activated (WINDOW ACTIVATE) for the displayed objects to be visible.
FORM DISPLAY displays form fields with values as they exist at the time the command is executed. If the application program changes the value of a field, the field must be re-displayed if the application user is to see the change.
A masked field that has no data value is displayed without the mask if the field is unavailable to the application user (i.e., protected or guarded). The mask of such a field is shown or suppressed when its availability changes (as a result of the FORM SET command).

Example

form display fGrandTot fInvItem.InvItemTot

Redisplays all fields of one form, and one field of another form.

form display input bell (2,,5)

Sounds the bell while re-displaying all form fields in the fifth instance of form number 2.
Name of the application directory in which the specified object can exist. If the dirname is omitted, the object can be created in any number of directories.

See Also

FORM CLEAR

FORM INPUT

FORM OPEN

FORM REPORT

FORM SCROLL

FORM SET

FORM SET

Dynamically Modifying Form Attributes

Syntax #1: Changing Attributes of Open Forms or Fields

Command: FORM SET («option») «object»

Parameters:

  • option:
    • [NOT] ABBREVIATE, [NOT] AUTOCLEAR, [NOT] AUTOSKIP, [UN] AVAILABLE, [NOT] BOLD, [NOT] CLICK, [NOT] DOUBLECLICK, EVENT eventName, FILLCOLOR color, FONT fontname, [NOT] GOTFOCUS, GUARDED, [NOT] IMMEDIATELY REQUIRED, [IN]VISIBLE, [NOT] ITALIC, LABEL label, [NOT] LOSTFOCUS, [NOT] LOSTFOCUSMODIFIED, [NOT] MODIFIED, MOUSEPOINTER fileName, NORMAL, PENCOLOR color, POINTSIZE n, PROTECTED, [NOT] REQUIRED, RESET, [NOT] REVERSE, [NOT] RIGHTCLICK, [NOT] SCROLL, SCROLL LINE n, SCROLL MAX n, SCROLL MIN n, SCROLL PAGE n, [NOT] STRIKEOUT, [NOT] SUPPRESS, [NOT] VALIDATE, VERB verbName, VISIBLE, [NOT] UNDERLINE
    • Except for NORMAL and RESET, each option affects only one attribute.
  • object:
    • form: Name of an open form or display in the current window. Specify a particular instance by appending the instance number in brackets.
    • formfield: Name of a form field. Specify a particular instance by appending the instance number in brackets.
    • ([exp1], [exp2], [exp3]): Positive integers or expressions evaluating to positive integers, identifying a particular form or form field. exp1 identifies the form number; exp2, the field number; exp3, the instance of the form or form field.

Syntax #2: Applying Attributes to Form Fields with Focus

Command: FORM SET («option») CURSOR

Parameters:

  • option:
    • [NOT] BOLD, FILLCOLOR color, [IN]VISIBLE, [NOT] ITALIC, NORMAL, PENCOLOR color, [NOT] REVERSE, [NOT] STRIKEOUT, [NOT] SUPPRESS, [NOT] UNDERLINE
    • Except for NORMAL, each option affects only one attribute.
  • CURSOR: Options are dynamically added to a form field when it gains focus and restored to the previous appearance when it loses focus.

Comments

  • NORMAL: Sets objects to an unsuppressed, visible, and non-reversed condition.
  • RESET: Resets objects to their initial state when the forms were opened.
  • Scrollbars:
    • MIN and MAX values define the range of acceptable values.
    • LINE represents the amount of space the thumb “jumps” when arrows are clicked.
    • PAGE represents the size of the thumb, usually a percentage of one “line”.

Example Commands

  • Setting attributes of fields:
  form set (reset) fAddEmp.EmpNum
  form set (italic lostfocus) fAddEmp.EmpNum
  form set (not lostfocus) fAddEmp.EmpNum
  form set (lostfocus) fAddEmp.EmpNum
  form set (bold) cursor  % displays the focus field in bold font
  • Setting attributes of forms:
  form set (reset) fAddEmp[3]
  form set (italic) (2,,3)
  form set (not scroll not required lostfocus) fEmps
  • Setting scrollbar attributes:
  form set (scroll page 8) fFileDir.UpDnBar
  form set (scroll max 50) fFileDir.LfRtBar

See Also

  • FORM SET SCROLL
pt_BRPortuguese