Skip to main content
Version: v18

Combo Box

Overview

A combo box is similar to a drop-down list, except that it accepts text entered from the keyboard and has additional options.

You initialize a combo box in exactly the same way as a drop-down list. If the user enters text into the combo box, it fills the 0th element of the array. In other respects, you treat a combo box as an enterable area that uses its array or a choice list as the set of default values.

Use the On Data Change event to manage entries into the enterable area, as you would for any enterable area object. For more information, refer to the description of the Form event command in the 4D Language Reference manual.

Options for combo boxes

Combo box type objects accept two specific options concerning choice lists associated with them:

  • Automatic insertion: enables automatically adding a value to a list stored in memory when a user enters a value that is not found in the choice list associated with the combo box.
  • Excluded List (list of excluded values): allows setting a list whose values cannot be entered in the combo box. If an excluded value is entered, it is not accepted and an error message is displayed.

Associating a list of required values is not available for combo boxes. In an interface, if an object must propose a finite list of required values, then you must use a Pop-up menu type object.

Supported Properties

Alpha Format - Bold - Bottom - Button Style - Choice List - Class - Date Format - Focusable - Font - Font Color - Font Size - Height - Help Tip - Horizontal Sizing - Italic - Left - Not rendered - Object Name - Right - Standard action - Time Format - Top - Type - Underline - Variable or Expression - Vertical Sizing - Visibility - Width