Entry
Auto Spellcheck
4D includes an integrated and customizable spell-check utility. Text type inputs can be checked, as well as 4D Write Pro documents.
The Auto Spellcheck property activates the spell-check for each object. When used, a spell-check is automatically performed during data entry. You can also execute the SPELL CHECKING
4D language command for each object to be checked.
JSON Grammar
Name | Data Type | Possible Values |
---|---|---|
spellcheck | boolean | true, false |
Objects Supported
Context Menu
Allows the user access to a standard context menu in the object when the form is executed.
For a picture type input, in addition to standard editing commands (Cut, Copy, Paste and Clear), the menu contains the Import... command, which can be used to import a picture stored in a file, as well as the Save as... command, which can be used to save the picture to disk. The menu can also be used to modify the display format of the picture: the Truncated non-centered, Scaled to fit and Scaled to fit centered prop. options are provided. The modification of the display format using this menu is temporary; it is not saved with the record.
For a multi-style text type input, in addition to standard editing commands, the context menu provides the following commands:
- Fonts...: displays the font system dialog box
- Recent fonts: displays the names of recent fonts selected during the session. The list can store up to 10 fonts (beyond that, the last font used replaces the oldest). By default, this list is empty and the option is not displayed. You can manage this list using the
SET RECENT FONTS
andFONT LIST
commands. - commands for supported style modifications: font, size, style, color and background color.
When the user modifies a style attribute via this pop-up menu, 4D generates the
On After Edit
form event.
For a Web Area, the contents of the menu depend of the rendering engine of the platform. It is possible to control access to the context menu via the WA SET PREFERENCE
command.
JSON Grammar
Name | Data Type | Possible Values |
---|---|---|
contextMenu | string | "automatic" (used if missing), "none" |
Objects Supported
Input - Web Area - 4D Write Pro areas
Enterable
The Enterable attribute indicates whether users can enter values into the object.
Objects are enterable by default. If you want to make a field or an object non-enterable for that form, you can disable the Enterable property for the object. A non-enterable object only displays data. You control the data by methods that use the field or variable name. You can still use the On Clicked
, On Double Clicked
, On Drag Over
, On Drop
, On Getting Focus
and On Losing Focus
form events with non-enterable objects. This makes it easier to manage custom context menus and lets you design interfaces where you can drag-and-drop and select non-enterable variables.
When this property is disabled, any pop-up menus associated with a list box column via a list are disabled.
JSON Grammar
Name | Data Type | Possible Values |
---|---|---|
enterable | boolean | true, false |
Objects Supported
4D Write Pro areas - Check Box - Hierarchical List - Input - List Box Column - Progress Bar - Ruler - Stepper
Entry Filter
An entry filter controls exactly what the user can type during data entry. Unlike required lists for example, entry filters operate on a character-by-character basis. For example, if a part number always consists of two letters followed by three digits, you can use an entry filter to restrict the user to that pattern. You can even control the particular letters and numbers.
An entry filter operates only during data entry. It has no effect on data display after the user deselects the object. In general, you use entry filters and display formats together. The filter constrains data entry and the format ensures proper display of the value after data entry.
During data entry, an entry filter evaluates each character as it is typed. If the user attempts to type an invalid character (a number instead of a letter, for example), 4D simply does not accept it. The null character remains unchanged until the user types a valid character.
Entry filters can also be used to display required formatting characters so that the user need not enter them. For example, an American telephone number consists of a three-digit area code, followed by a seven-digit number that is broken up into two groups of three and four digits, respectively. A display format can be used to enclose the area code in parentheses and display a dash after the third digit of the telephone number. When such a format is used, the user does not need to enter the parentheses or the dashes.
Defining an entry filter
Most of the time, you can use one of the built-in filters of 4D for what you need; however, you can also create and use custom filters:
- you can directly enter a filter definition string
- or you can enter the name of an entry filter created in the Filters editor in the Toolbox. The names of custom filters you create begin with a vertical bar (|).
For information about creating entry filters, see Filter and format codes.
Default entry filters
Here is a table that explains each of the entry filter choices in the Entry Filter drop-down list:
Entry Filter | Description |
---|---|
~A | Allow any letters, but convert to uppercase. |
&9 | Allow only numbers. |
&A | Allow only capital letters. |
&a | Allow only letters (uppercase and lowercase). |
&@ | Allow only alphanumeric characters. No special characters. |
~a## | State name abbreviation (e.g., CA). Allow any two letters, but convert to uppercase. |
!0&9##/##/## | Standard date entry format. Display zeros in entry spaces. Allow any numbers. |
!0&9 Day: ## Month: ## Year: ## | Custom date entry format. Display zeros in entry spaces. Allow any numbers. Two entries after each word. |
!0&9##:## | Time entry format. Limited to hours and minutes. Display zeros in entry spaces. Allow any four numbers, separated by a colon. |
!0&9## Hrs ## Mins ## Secs | Time entry format. Display zeros in entry spaces. Allow any two numbers before each word. |
!0&9Hrs: ## Mins: ## Secs: ## | Time entry format. Display zeros in entry spaces. Allow any two numbers after each word. |
!0&9##-##-##-## | Local telephone number format. Display zeros in entry spaces. Allow any number. Three entries, hyphen, four entries. |
!_&9(###)!0###-#### | Long distance telephone number. Display underscores in first three entry spaces, zeros in remainder. |
!0&9###-###-### | Long distance telephone number. Display zeros in entry spaces. Allow any number. Three entries, hyphen, three entries, hyphen, four entries. |
!0&9###-##-### | Social Security number. Display zeros in entry spaces. Allow any numbers. |
~"A-Z;0-9; ;,;.;-" | Uppercase letters and punctuation. Allow only capital letters, numbers, spaces, commas, periods, and hyphens. |
&"a-z;0-9; ;,;.;-" | Upper and lowercase letters and punctuation. Allow lowercase letters, numbers, spaces, commas, periods, and hyphens. |
&"0-9;.;-" | Numbers. Allow only numbers, decimal points, and hyphens (minus sign). |
JSON Grammar
Name | Data Type | Possible Values |
---|---|---|
entryFilter | string |
Objects Supported
Check Box - Combo Box - Hierarchical List - Input - List Box Column
Focusable
When the Focusable property is enabled for an object, the object can have the focus (and can thus be activated by the keyboard for instance). It is outlined by a gray dotted line when it is selected — except when the Hide focus rectangle option has also been selected.
An input object is always focusable if it has the Enterable property.
-
Check box shows focus when selected -
Check box is selected but cannot show focus|
When the Focusable property is selected for a non-enterable object, the user can select, copy or even drag-and-drop the contents of the area.