Language Reference Guide : 5. Events : ChildClickPoint Event
 
Share this page                  
ChildClickPoint Event
The ChildClickPoint event is triggered for a composite field when the user clicks a child field set to the FB_CLICKPOINT bias.
This event has the following syntax:
on childclickpoint [compositefieldname]
compositefieldname is optional if you specify this event in a field script, or if the composite field is the frame's top form.
The following attributes of the FrameExec class can be used in the ChildClickPoint event block:
TriggerField
Specifies the child field with a bias setting of FB_CLICKPOINT on which the user clicked
OriginatorField
Specifies the composite field in the initial on childclickpoint statement
XStart
Specifies the x coordinate of the click, relative to TriggerField
YStart
Specifies the y coordinate of the click, relative to TriggerField.
The x coordinates and y coordinates are expressed in 1000ths of an inch and are relative to the upper left corner of the field that received the click.
To access these attributes, use the CurFrame system variable of the FrameExec Class.
Usage: The ChildClickPoint 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 ChildClickPoint event is triggered when the user clicks any field that has a bias of FB_CLICKPOINT.
The ChildClickPoint event block can be used to process ClickPoint events for any of several fields that might be expecting a ClickPoint event.
For example, assume that your form has two image fields, image1 and image2. When the user clicks either of these fields, you want to detect the ClickPoint on the image and send the information to a called procedure for processing. You could use two separate ClickPoint event blocks, one for each image field, as follows:
on clickpoint picture1 =
begin
callproc process_click
(picture_name = 'picture1', xcoordinate =
CurFrame.Xstart, ycoordinate =
CurFrame.Ystart);
end

on clickpoint picture2 =
begin
callproc process_click
(picture_name = 'picture2',
xcoordinate = CurFrame.Xstart,
ycoordinate = CurFrame.Ystart);
end
Alternatively, to save code, use one ChildClickPoint event block for both image fields. In the following code, both image fields are placed in a composite field (a subform, flexible form, matrix field, or stack field):
on childclickpoint picture_subform =
begin
callproc process_click
(picture_name =
CurFrame.TriggerField.Name,
xcoordinate = CurFrame.Xstart,
ycoordinate = CurFrame.Ystart);
end
In this example, the two image fields make up a composite field called picture_subform. When the user clicks either field (assuming that the fields have the proper bias), the event block is executed.
You can specify a ClickPoint event block for a field and a ChildClickPoint event block for one or more of the enclosing composite fields for the field. OpenROAD then executes the event blocks from the innermost to the outermost field as described in Event Block Execution.
More information:
OriginatorField Attribute
TriggerField Attribute
XStart Attribute
YStart Attribute