ChildDragBox Event
The ChildDragBox event is triggered for a composite field when one of its child fields, set to a bias of FB_DRAGBOX, receives a DragBox event.
This event has the following syntax:
on childdragbox [compositefieldname]
compositefieldname is optional if you specify this event in a field script for a composite name, or if the composite field is the frame's top form.
The following attributes of the FrameExec class can be used in the ChildDragBox event block:
TriggerField
Specifies the field with a bias setting of FB_DRAGBOX that was under the mouse cursor at the start of the drag
OriginatorField
Specifies the composite field specified in the initial on childdragbox statement
XStart
Specifies the x coordinate of the upper left corner of the drag box, relative to TriggerField
YStart
Specifies the y coordinate of the upper left corner of the drag box, relative to TriggerField
XEnd
Specifies the x coordinate of the lower right corner of the drag box, relative to TriggerField
YEnd
Specifies the y coordinate of the lower right corner of the drag box, relative to TriggerField
The coordinate values are expressed in 1000ths of an inch and are relative to the upper left corner of the TriggerField.
In the ChildDragBox event, the XStart and YStart attributes always represent the upper left corner of the drag, even if the user started the drag from one of the other corners.
Usage: The ChildDragBox 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 ChildDragBox event is triggered when a DragBox event occurs on any field in the frame that is set to a bias of FB_DRAGBOX.
The ChildDragBox event can be used to detect all DragBox events while the user creates and moves new fields on the form.
When a ChildDragBox event occurs, OpenROAD sets the TriggerField attribute to the field that was under the starting corner of the drag box (if that field has the bias FB_DRAGBOX). If fields overlap or if you want to detect a drag box on a composite field, ignoring whether the drag started on a child field or on the composite field's background, you can do the following:
• Set the bias of all the child fields to FB_VISIBLE.
• Set the bias of the composite field to FB_DRAGBOX.
• Then use the DragBox event block for the composite field.
• You can use the FrameExec attributes XStart, YStart, XEnd, and YEnd to access the exact coordinates of the drag box.
You can specify a DragBox event block for a field and a ChildDragBox event block for one or more of the enclosing composite fields for the field. OpenROAD then executes the events from the innermost to the outermost fields as described in
Event Block ExecutionMore information:
Last modified date: 12/20/2023