DropDown

[property icon] DropDown

Used to set the DBEdit control to act as a regular edit control or as a drop down list box

Enumerated type, possible values are:

Default Grid default rules
DropFocus The control will have a drop down list but the down arrow used to signify that the control has drop down capabilities is not displayed until the control gets focus
DropEnabled The control can have a drop down list but the down arrow used to signify that is only displayed if the control is enabled
DropAlways The control will display the down arrow at all times

Applies to: KCMLEdit


[property icon] DropDown

Determines if a dropdown list is enabled

Enumerated type, possible values are:

Default Grid default rules apply
NoDrop Act as a standard Edit control with no drop down capabilities
DropFocus The control will have a drop down list but the down arrow used to signify that the control has drop down capabilities is not displayed until the control gets focus
DropEnabled The control can have a drop down list but the down arrow used to signify that is only displayed if the control is enabled
DropAlways The control will display the down arrow at all times

Applies to: Grid , GridCell


[event icon] DropDown() Event

Called before the drop down portion of the control is displayed

Applies to: ComboBox , KCMLEdit


[event icon] DropDown() Event

Called before the drop down portion of the control is displayed

Applies to: Grid

Introduced in KCML version 5.02


>

DropDown

The DropDown enumerated property is used to instruct the control to act as either a regular edit control or as a drop down list box. This property is a design time only property and can not therefore be changed under program control.

The DropDown() event is called when the drop down section of an edit control is revealed by clicking the dropdown arrow. This allows the drop down list to be filled on demand rather than filling all drop down control before the form is displayed. The DropStyle property must be set accordingly to enable the drop down section of the control.

If the DropDownFilled property is TRUE then this event handler will be ignored so once the list has been filled the event handler should set this property to TRUE so that it won't be called again.

Note that when an edit cell is created in a grid, KCML searches the cell, then the row, then the col and finally the grid for a listbox to use. Just setting the DropDown and DropStyle properties is not sufficient as it will not be known which list to use. Any action that affects the list may be used to instantiate the list, such as setting the DropDown property or adding items to the list using the Add() method.

REM Set up column 5 to have a drop down list
.gridControl1.Cell(0, 5).DropDown = &.DropAlways
.gridControl1.Cell(0, 5).DropStyle = &.DropDown
REM Force a list to be created for the column
.gridControl1.Cell(0, 5).DropDownFilled = FALSE
REM The first time a drop down in this column is selected, the DropDown
REM event will be triggered. CursorCol will be 5 and so we will
REM be able to fill in the drop down contents.

See also

ComboBox methods, properties and events. Grid methods, properties and events. GridCell methods, properties and events. KCMLEdit methods, properties and events.