Language Reference Guide : Events : DoubleClick Event
 
Share this page          
DoubleClick Event
The DoubleClick event is triggered for an active field when the user double-clicks the primary mouse button.
This event has the following syntax:
on doubleclick [fieldname]
fieldname is optional if you specify the event in a field script.
The following attributes of the FrameExec class can be used in the DoubleClick event block:
TriggerField
Specifies the field that the user double-clicked
OriginatorField
Specifies the field in the initial on doubleclick statement
Use the CurFrame system variable to access these attributes. For more information, see FrameExec Class.
Usage: The DoubleClick event is defined for all form fields, including the subform that is the frame's top form. It is not defined for menu fields. If you specify this event in the frame script without a field name, the event is triggered when the user double-clicks the form's background.
DoubleClick events follow Click events. If both Click and DoubleClick code blocks are used, a double-click triggers a single Click event, followed by a DoubleClick event. If only a Click event is specified, then double-clicking generates two Click events. DoubleClick events are not triggered if the user clicks twice on an editable entry field. In this case, only text is selected.
The DoubleClick event block works only with a single field, either a scalar field or a composite field. If it is used for a composite field it is generated only if the double-click is on the background of the field. For example, on table fields, double-clicking any of the trim causes a DoubleClick event. To capture double-clicks anywhere on the composite field, use both the DoubleClick event and the ChildDoubleClick event, as shown in the following example code:
on doubleclick tblfield,
on childoubleclick tblfield =
begin
    callframe explosion_frm(field = 'tblfield');
end
Double-clicking a table field's scroll bar or a viewport field's scroll bar will not generate a DoubleClick event. Instead, it causes two Scroll events to be generated, if scrolling is possible.
Note:  OpenROAD does not detect DoubleClick button clicks on entry fields that are set to FB_CHANGEABLE. Instead, this action will select text within the field.
More information:
OriginatorField Attribute
TriggerField Attribute