udropdownlist (DropDownList)

The udropdownlist widget is a field-level widget that can display a list of valid options in a list below the input field, so that the user can select one. It is applicable only to form components.

DropDownList widget, opened

For more information, see Specifying a Widget for a Field or Entity and ValRep.

Widget Overview
Logical widget name: DropDownList
Maps to physical widget:


Default definition:


Use for: String fields with ValRep list.
Supported triggers: trigger valueChanged
Supported properties: See Widget Properties
Supported in egrid(Grid) widget? Yes. Some properties may not be applicable.

For more information, see egrid (Grid) and Widgets and Properties Supported in Grid Widget.

Supports MSAA? : Yes, for testing purposes only. For more information, see Accessibility.


Use the udropdownlist widget when you want users to select a single item from a predefined list of possible values. The user cannot edit items or select multiple items.

Entering a character in the field causes Uniface to search the list for the first item that begins with that character. This search is case-insensitive. If UPC (uppercase) or LOC (lowercase) are specified in the field's syntax definition, it is ignored.

Each time the user selects an item from a drop-down list, Uniface sets the field to the value associated with the selected item and activates the valueChanged trigger for that field.

The ^REM_FIELD structure editor function (which removes the current selection) has no effect in this widget.

ValRep Handling

The widget uses the ValRep list defined for the field to build up the options visible in the list. It expects a list of Value=Representation pairs and displays the representations in the list. If a ValRep item does not have a Representation, the Value is displayed instead. When the user selects an item in the list, the corresponding value is selected.

If you want to define an empty string value as one of the items in the list, enter a representation without a corresponding value. You can test for empty string values by testing for an empty string ("").

For more information, see ValRep.

It is also possible to include images or icons in ValRep lists. For more information, see Images in ValRep Lists.

Widget Properties

In character mode, only the Sort Alphabetically property is applicable.

DropDownList Widget Properties


Technical Name


3-D Effect (3d)



Attach to Window Border (attach)



Background Color (BackColor)



Gradient Fill Style (BackColorFill)



Active Background Color (BackColorSelect)



Bottom Line (BottomLine)



Draw 3-D Frame Outside (DrawOutside)




(Not supported in grid cell)

Dynamic No
Extended UI (ExtendedUI) ExtendedUI Yes
Force Fit ForceFit Yes
Foreground Color (ForeColor) ForeColor Yes
Active Foreground Color (ForecolorSelect) ForeColorSelect Yes
Frame Frame Yes
Label Font (LabelFont) LabelFont Yes
Mouse Pointer (Cursor) Cursor Yes
Sort Alphabetically Sort No
Tool Tip Text (ToolTipText) ToolTipText Yes
Value and Representation Yes
Visible Entries (Entries) Entries Yes
Widget Font (Font) Font Yes
Item Image Size (Image Size (ImgSize)) ImgSize No
Attach Margin (AttachMargin) AttachMargin Yes
Popup Rectangle (PopupRect) PopupRect Yes

Character Mode

In character mode, the drop-down list widget is displayed as a field frame, with the last position of the field showing the VIEW_DROPDOWN character. The currently selected option is displayed in the field. If the current option is too long, it is truncated.

If there is not enough room on the component to display all the options, the VIEW_MOREUP or VIEW_MOREDOWN characters are displayed. The VIEW_MOREUP character is displayed in the upper right-hand corner of the widget if there are more options above the top one displayed. The VIEW_MOREDOWN character is displayed in the lower right corner of the widget if there are more options below the bottom one displayed. The VIEW_MOREUP and VIEW_MOREDOWN characters are displayed in inverse. For more information, see Character Mode Widget Mnemonics.

Related Topics