Field properties

The field properties control the characteristics of the fields in the window. If you are using the Themes service provided by the operating system, be aware that this service will override some of the properties you can set for a field. The following table lists the field properties.

[spacer]

Object property

Description

AutoComplete

For string fields, specifies whether the field will use the auto-complete capability. If this property is set to true, the contents of the field will automatically be completed as the user types, based on a list of values associated with the field.

AutoCopy

Specifies whether information can be automatically transferred between the field and table buffer when the copy to table, copy from table to window, copy from window to table, or copy to table script statements are used. If set to false, these statements don’t affect the field.

Cancel

If set to true, the change script attached to this field is run when the user presses esc while the window containing the field is active. This property is typically set to true for a Cancel push button field. This property is available only for push button fields.

DataType

Indicates the data type used for the field.

Default

If this property is set to true, pressing the enter key or double-clicking a list box or scrolling window with the DefaultDblClick property set to true causes the push button’s change script to run. This property is typically set to true for an OK or Save push button field. This property is available only for push buttons.

DefaultDblClick

Setting this property to true allows the user to double-click a list box field to accomplish the action of selecting an item and clicking the push button whose Default property is set to true.

DisableLookup

If set to true, prevents a lookup form associated with the field from opening when a user chooses the Lookup menu item.

Editable

Specifies whether the user can edit the contents of the field.

EditMode

For text fields, this property specifies how text fields can be edited. If set to DisplayOnly, the text field can’t be edited. If set to Editable, the field can be edited. If set to SelectOnly, text can be selected, but not changed.

EndTransaction

When set to true, this property causes all pending change scripts to be run. This property is available only for push button fields.

Field

Indicates the field being used and allows you to edit characteristics of the field definition.

FieldID

Indicates the resource ID of the field.

FieldType

Indicates whether the field is a global field or a local field.

HelpContextID

Lists the help context ID value for the field.

Hyperspace

When set to true, the push button can be clicked without running the change script or post script for the currently-focused field. Only the change script for the push button will be run. Typically, this property is set to true for Cancel buttons. This property is available only for push button fields.

LinkedFormat

Lists the format field linked to the current field.

LinkedLookup

Lists the lookup field (typically a push button) linked to the current field.

LinkedPrompt

List the prompt linked to the field.

Password

If set to true for string fields, the field will display Xs instead of the data entered in the field. This is typically used for password fields.

Required

Specifies whether the field will be checked by the required() function. Set this property to true when you want to be sure the user enters a value in this field. Also, if this property is set to true, and the Show Required Fields menu item is selected, any prompt linked to the field will be displayed according to the color and style specified by the Field_SetRequiredFormat() function.

SavedOnRestart

If set to true, causes the field to keep the value that was last entered in it, when the form or window is restarted with the restart form or restart window statements. If set to false, a restart will clear the field.

ScrollBars

If set to true, a text field will have scroll bars. If set to false, no scroll bars will be displayed.

SetChangeFlag

Specifies whether changes to a field’s value will set the change flag for the form or window. If set to true, the change flag will be set when the contents of the field change. If set to false, the change flag won’t be set.

TabStop

Specifies whether to include a window field in the tab sequence. If set to true, the window field will be in the tab sequence.

Tooltip

Specifies the tooltip that will be displayed for the field.

UseUniqueHelp

If set to true, a unique HelpContextID will be generated for this instance of the field. If set to false, the same HelpContextID will be generated for all instances of this field in the application.

Visible

If set to true, the field will be visible. If set to false, the field will be hidden.

VisibleItems

For drop-down list and combo box fields, specifies the maximum number of items displayed when the list is displayed in the dropped position.

WordWrap

For text fields, specifies whether text will wrap.


[spacer]

Visual property

Description

Alignment

Specifies whether the item is left-, center- or right-aligned.

Appearance

For edit fields, specifies what type of border the field will have. For push buttons, button drop lists and push button-style check boxes, setting this property to 3D Highlight causes the button to have a flat appearance until the mouse pointer passes over the button.

BackColor

Specifies the background color of the field.

Border

If set to true, a border is drawn around the field.

Direction

For progress indicator fields, indicates the direction the bar will move in the progress indicator.

DropIndicator

For button drop list fields, specifies whether the drop indicator will be displayed.

DropPosX

For button drop list fields, specifies the distance in pixels the drop indicator will be drawn from the right edge of the control.

DropPosY

For button drop list fields, specifies the distance in pixels the drop indicator will be drawn from the bottom edge of the control.

Font

Specifies the font to use for the field.

FontColor

Specifies the color of the text for the field.

FontBold

If set to true, the field text will be displayed in bold type.

FontItalic

If set to true, the field text will be displayed in italic type.

FontUnderline

If set to true, the field text will be underlined.

IndicatorColor

Specifies the color of the progress indicator blocks or bar.

Pattern

Specifies the pattern to apply to the background.

PatternColor

Specifies the color of the pattern that is applied to the background.

PatternSelect

Specifies the pattern used when a push button-style check box is selected.

Position-Left

Indicates the position of the left edge of the field, measured in pixels from the left edge of the window.

Position-Top

Indicates the position of the top edge of the field, measured in pixels from the top of the window.

Resize-Horizontal

Specifies the horizontal resize behavior when per field resizing is used. Refer to Resizing windows for more information.

Resize-Vertical

Specifies the vertical resize behavior when per field resizing is used. Refer to Resizing windows for more information.

Scaling

For picture fields, specifies how the picture pasted into the field will be scaled. Proportional indicates the picture will maintain its original size and proportions. Stretch indicates the picture will be stretched to fill the picture field.

ShowPartialItems

For native list boxes, setting this property to true causes the list box to be drawn exactly the height indicated in the layout window. If there isn’t enough room to display the last item, it will be only partially drawn. When this property is set to false, the list box will be resized vertically to include just the last complete item.

Size-Height

Indicates the field height, measured in pixels.

Size-Width

Indicates the field width, measured in pixels.

Style

For push button and button drop list fields, specifies whether the button will display text only, graphics only, or both text and graphics. It also specifies the arrangement of the text and graphics.

For check box fields, specifies whether the field displays as a standard check box or a push button.

For progress indicator fields, specifies whether the progress indicator is composed of blocks or is a solid rectangle.

Zoom

For push button fields, setting this property to true causes the pointer to become the zoom pointer (magnifying glass) when it’s moved over the field. Typically, the Visible property is also set to false to make the push button invisible.



Documentation Feedback