DropDown - AutoCompleting Event
Fired as the user enters a value in the edit, allowing for the value to be replaced with a new value
Member of DropDown (PRIM_LIST.DropDown)

Parameters

Name

Type

Data Type

Description

Value

*Both

Unicode String

Current value of the field and the replacement value to return

Handled

*Both

Boolean

Set to true to stop the key being processed automatically

Details


The AutoCompleting event provides an opportunity for the value to be completed as the user types.
The value entered is passed in to the event via the Value parameter. The value can then be modified and returned to the edit.
Selection of characters within the edit is managed automatically.

Example


In this example, the set of available items in the drop down is filtered based on the value entered.
Begin_Com Role(*EXTENDS #PRIM_WEB) Height(456) Width(864)
Define_Com Class(#PRIM_LIst.DropDown) Name(#DropDown) ColumnHeaderHeight(0) DisplayPosition(1) Left(16) Parent(#COM_OWNER) RowLines(False) TabPosition(1) Top(16) Height(41) Width(241) DropDownStyle(DropDown)
Define_Com Class(#PRIM_List.String) Name(#DropDownColumn) ColumnResize(False) ColumnUnits(Proportion) ColumnWidth(1) DisplayPosition(1) Parent(#DropDown)
Evtroutine Handling(#Com_owner.CreateInstance)
Begin_Loop To(100)
Add_Entry To_List(#DropDown)
#DropDownColumn.CurrentItem.Value := ("Item &1").Substitute( #DropDown.Items.ItemCount.AsString )
End_Loop
Endroutine
Evtroutine Handling(#DropDown.AutoCompleting) Value(#Value) Handled(#Handled)
#Handled := True
Selectlist Named(#DropDown)
#DropDown.CurrentItem.Visible := #DropDownColumn.CurrentItem.Value.Contains( #Value )
Endselect
Endroutine
End_Com

See also

All Component Classes
Technical Reference