ComponentOne Query 8.0
LookupValues Event

Syntax

C1QueryFrame_LookupValues (Field As Field, Values, ValueCaptions, EditorType As EditorTypeEnum, ShowCaption As Boolean)

Arguments

Field is the Field object describing the field whose constant value is about to be edited by selecting from a list of values.

Values is an array of variant values. When the user selects a value (one of ValueCaptionsstrings), the corresponding value from the Values array is saved in the query item and later used in SQL generation.

ValueCaptions is the array of strings shown to the user in the combo box list or menu. The user selects one of these strings. Value and ValueCaptions must have the same dimensions, the same lower and upper bounds.

EditorType determines how the lookup list is presented to the end user.

 

Constant Value

Meaning

0 – c1qEditorMenu

The list is shown as a menu.

1 – c1qEditorComboEditable

The list is shown in the list portion of a combo box. The user can select from the list, and it is also possible to type the value directly in the edit box portion of the combo.

2 – c1qEditorComboNoneditable

The list is shown in the list portion of a combo box. The user can only select from the list.

Description

The LookupValues event is fired before showing a lookup list when the end user starts editing a field with Use lookup values check box checked in the schema designer (in Folder Designer). It gives the programmer an opportunity to modify the lookup list specified in the schema, or to create a lookup list from scratch. To modify or create a lookup list, set the Values and ValueCaptions arguments. Setting the EditorType argument you can determine whether the list is shown in a combo box or in a menu.

See Also

Lookup Value Lists

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback