RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TValueListEditor.OnGetPickList Event

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

Pascal
property OnGetPickList: TGetPickListEvent;
C++
__property TGetPickListEvent OnGetPickList;

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. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!