Fired as a value is being edited allowing for a replacement value to be returned
Member of DropDown (PRIM_MD.Dropdown)
Name | Type | Data Type | Description |
---|---|---|---|
Value | *Both | Unicode String | Current value and the replacement value to return |
Handled | *Both | Boolean | Set to true to stop the value being automatically updated control |
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.
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_MD.DropDown) Name(#DropDown) ColumnHeaderHeight(0) DisplayPosition(1) Label('Filter Numbers') Left(8) Parent(#COM_OWNER) PromptIcon('arrow_drop_down') RowLines(False) TabPosition(1) Top(8) DropDownPosition(Bottom) DropDownStyle(DropDown) Define_Com Class(#PRIM_MD.DataTableString) 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) #DropDown.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) #DropDownColumn.CurrentItem.Visible := #DropDownColumn.CurrentItem.Value.Contains( #Value ) Endselect Endroutine End_Com
Febuary 18 V14SP2