ComponentOne Query 8.0
BeforeEdit Event

Syntax

C1QueryFrame_BeforeEdit (Field As Field, Value, ValueText As String, ModalEditing As Boolean, ShowCustomEditor As Boolean, TypedEditing As Boolean, ControlWidth As Double, ControlHeight As Double)

Arguments

Field is the Field object describing the field whose constant value is about to be edited.

Value is the value of the constant, stored in the query item, as it is before editing.

ValueText is the textual representation of the constant, displayed in the query item, as it is before editing. You can change this argument in your event procedure, setting it to a string that you want to show up in the editor.

ModalEditing is set to False on entering the event procedure. You can set it to True to indicate that you perform Modal Editing. In this case, you show a dialog box, a modal form or a menu in your event code, and modify the query item in the EndEdit event. See Modal Editing for details.

ShowCustomEditor is set to False on entering the event procedure. If you leave the event procedure without setting it to True, C1QueryFrame uses Default Editing (typed editing, according to the field’s data type), or just shows the standard edit box, depending on the value of the TypedEditing argument. If you set ShowCustomEditor to True, C1QueryFrame starts the process of Custom Editing triggering the ShowCustomEditor event.

TypedEditing is set to True on entering the event procedure. If you leave the event procedure without setting it to False, and don’t set ShowCustomEditor and ModalEditing, C1QueryFrame uses typed editing, a specialized editor according to the field’s data type, see Default Editing for details. If you set TypedEditing to False, C1QueryFrame uses the standard edit box to edit the value, regardless of the data type.

ControlWidth, ControlHeight are set to 0 on entering the event procedure. You can set these arguments to any desired values, if you want to specify the width and height of the editor. This works for all kinds of editing: Default Editing (both Typed Editing and the standard edit box) and Custom Editing. The difference is only that in default editing setting ControlWidth/ControlHeight is optional, C1QueryFrame uses reasonable defaults if they are not set, whereas in custom editing, setting these arguments is mandatory.

Description

The BeforeEdit event occurs when the user starts editing a constant value. This event gives the programmer an opportunity to change some aspects of the editing process, or completely override the standard editing with Modal Editing or Custom Editing.

If you do not need modal or custom editing, you can still influence certain aspects of the standard editing process setting the ValueText, TypedEditing and ControlWidth/ControlHeight arguments.

To implement modal editing, set ModalEditing to True.

To implement custom editing, set CustomEditing to True.

See Also

Custom Editing and Lookup

 

 


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

Product Support Forum  |  Documentation Feedback