Version 6.3.8 for Windows
 —  Dialog Component Reference  —

Selection Box Control

This document covers the following topics:


Description

A selection box control is a combination of an input field, a list box, and a push button. When no selection has been made, it consists of an input-field with a push button next to it. With the push button, the end user may open a list box from the input field. This list box contains any number of items from which the end user can select one. The selected item is then copied into the input-field.

It is possible to get a selection box control without a push button where the list box is always dropped down: the STYLE attribute value must have the value "X".

You can map database fields or other program variables to the input section of a selection box control by means of a linked variable. The input is automatically copied to a linked variable if you select the "Linked Variable" option in the attribute window's "Source" dialog box and you enter the name of the linked variable, for example the database field. When the end user has finished entering data and the selection box control loses the focus, the entered data are validated.

You can also validate the input data by assigning an EDIT-MASK attribute to the selection box control: the check is performed when the input-field in the selection box control loses the focus.

When the linked variables have been modified by code and you want to display the new values, you use the PROCESS GUI statement action REFRESH-LINKS.

Whenever input is rejected, for example, because the linked variable has another Natural data type, or because the EDIT-MASK was not matched, a message box is displayed that prompts the end user to "Retry" or "Cancel". The end user must press "Retry" to keep the current content of the input field control and to modify it. The end user must press "Cancel" to reset the input field control to the last valid content.

Note:
Input in a selection box control's input-field is limited to 253 characters. If you set the STYLE attribute to the value "X" (dropped down), the MODIFIABLE attribute value is automatically set to TRUE. If you set the MODIFIABLE attribute to FALSE, the STYLE attribute automatically no longer has the value "X".

Top of page

Attributes for Selection Box Control

Attribute Name Query Set/Modify In Attr. Window
BACKGROUND-COLOUR-NAME X X/X X
BACKGROUND-COLOUR-VALUE X X/X X
CLIENT-DATA X X/X  
CLIENT-HANDLE X X/X  
CLIENT-KEY X X/X  
CLIENT-VALUE X X/X  
CONTEXT-MENU X X/X X
DIL-TEXT X X/X X
EDIT-MASK X X/- X
ENABLED X X/X X
FIRST-CHILD X -/-  
FOLLOWS X X/X  
FONT-HANDLE X X/X X
FOREGROUND-COLOUR-NAME X X/X X
FOREGROUND-COLOUR-VALUE X X/X X
HELP-ID X X/X X
LAST-CHILD X -/-  
LENGTH X X/X X
LINKED X X/- X
MODIFIABLE X X/- X
MODIFIED X -/X  
MODIFIED-SUCCESSOR X -/-  
OWNER X X/-  
PARENT X X/-  
PREDECESSOR X -/-  
RECTANGLE-H X X/X X
RECTANGLE-W X X/X X
RECTANGLE-X X X/X X
RECTANGLE-Y X X/X X
ROW-COUNT X -/-  
RTL X -/- X
SELECTED-SUCCESSOR X -/-  
SORTED X X/-  
STRING X X/X X
STYLE X X/- X
SUCCESSOR X -/-  
SUPPRESS-BEFORE-OPEN-EVENT X X/X  
SUPPRESS-CHANGE-EVENT X -/-  
SUPPRESS-ENTER-EVENT X X/X  
SUPPRESS-LEAVE-EVENT X X/X  
TOOLTIP X X/X  
TYPE X X/-  
VARIABLE   X/X X
VISIBLE X X/X X

Top of page

Events

Before Open Event, Change Event, Enter Event, Leave Event (all events may be suppressed).

Note:
The change event occurs for a selection box control if the end user changes the content, if the code changes the content or if an item is selected and transferred to the input-field area. It does not occur on the initial setting of the selection box control. It is not recommended to manipulate the system focus from within the change event handler.

Top of page