5. Events : ChildDoubleClick Event
 
Share this page                  
ChildDoubleClick Event
The ChildDoubleClick event is triggered for a composite field when the user double-clicks a child field.
This event has the following syntax:
on childdoubleclick [compositefieldname]
compositefieldname is optional if you specify this event in a field script for a composite field, or if the composite field is the frame's top form.
The following attributes of the FrameExec class can be used in the ChildDoubleClick event block:
TriggerField
Specifies the field on which the user clicked
OriginatorField
Specifies the composite field specified in the initial on childdoubleclick statement
To access these attributes, use the CurFrame system variable of the FrameExec class (see FrameExec Class).
Usage: The ChildDoubleClick event is defined for all composite fields, including the subform that is the frame's top form. If you specify this event in the frame script without a composite field name, the ChildDoubleClick event is triggered when the user double-clicks while the mouse is positioned over any field in the frame.
The ChildDoubleClick event can be used with table fields that contain entry fields (unlike ChildClick). The bias of the entry field should be FB_LANDABLE if you want to use this event.
For example, assume that your form contains a table field, testtable, which displays an array and is set to a bias of FB_LANDABLE. When the user double-clicks a highlighted row, you want to call the RowExecute frame. You could use the following code:
on childdoubleclick testtable =
begin
if field(testtable).CurRow > 0 then
callframe RowExecute(name =
testtable[].Object_name);
else
    /* No row is highlighted in the table field */
    ...
endif;
end
If the operations in the ChildDoubleClick event block are the same for all the fields on a form, you can use one event block for all fields by placing the event block in the frame script and not specifying a composite field name in its syntax. You then use the TriggerField attribute to determine which object was double-clicked.
If you wish to process selected fields, not the field that was actually clicked on, use the SelectedList attribute of the FrameExec object, rather than the TriggerField attribute.
You can specify a DoubleClick event block for a field and a ChildDoubleClick event block for one or more of the enclosing composite fields for the field. OpenROAD executes the event blocks as described in Event Block Execution (see Event Block Execution) under ChildClick event.
More information:
OriginatorField Attribute (see page OriginatorField Attribute)
TriggerField Attribute (see page TriggerField Attribute)