Vcl.ValEdit.TValueListEditor.OnGetPickList

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnGetPickList: TGetPickListEvent read FOnGetPickList write FOnGetPickList;

C++

__property TGetPickListEvent OnGetPickList = {read=FOnGetPickList, write=FOnGetPickList};

Properties

Type Visibility Source Unit Parent
event published
Vcl.ValEdit.pas
Vcl.ValEdit.hpp
Vcl.ValEdit TValueListEditor

Description

Supplies a pick list for values associated with a particular key.

Write an OnGetPickList event handler to provide a drop-down list of values for specific names from the first (key) column. OnGetPickList is called when the value column gets focus and the name (key) column contains the string specified by KeyName.

If the ItemProps property has an EditStyle of esPickList for this item, The Values parameter of the event handler is initialized to the value of its PickList property for this item. Otherwise, Values is initialized to an empty list. In either case, the event handler can change the list of values that appear in the drop-down pick list.

If the OnGetPickList event handler exits with a non-empty string list as the value of the Values parameter, a drop-down arrow appears in the value column. The user can click this arrow button to display the pick list you supplied as the value of Values. This makes the Value column behave like a drop-down combo box: the user can select items from the list or type in an entirely different value.

See Also