UNIFACE 8.1.01 Extended triggers
Extended triggers for OCX container widget
Extended triggers for drag & drop
CopyTo
CreateShortcutTo
MoveFrom
MoveTo
MoveWithin
Extended triggers for map widget
RollOver
Extended triggers for picture widget
Extended triggers for tree widget
Close
Collapse
ColumnSorted
DoubleClick
Expand
Open
RepresentationChanged
Also see: What is Extended trigger
The OCX container widget does not have a fixed set of extended triggers, it depends which OCX is loaded in the container.
Just like for normal OWI widgets, the extended trigger "placeholder" code is filled in the component editor by the widget.
All OCX-generated events are routed to extended triggers.
If you have existing UNIFACE Seven code which uses the Detail and Async trigger to receive
events, note that these will still be fired (for compatibility) as well as the extended
triggers. This means you will have to choose for one method or the other.
UNIFACE translates OCX datatypes to the appropriate UNIFACE datatypes.
It is noteworthy that the OCX datatype "object" is translated to
"handle", although nothing can be done with a handle from an OCX in the current
UNIFACE version.
trigger copyTo params string dragvalue: in string dropformat: in string itemvalue: in numeric numberofobjects: in numeric index: in endparams end ; trigger copyTo
The extended trigger CopyTo is fired when a drop with drop action = Copy occurs.
Dragvalue = The value of the dragged object
Dropformat = The negotiated drop format
Itemvalue = The value of the (tree) item on which the drop occurs; this value will be
"" (empty string) if a drop occurs on a widget, e.g. on a picture widget.
Numberofobjects = (in the case of multiple drop) the number of multiple objects being
dropped
Index = (in the case of multiple drop) the 1-based index of the object being dropped
trigger createShortcutTo params string dragvalue: in string dropformat: in string itemvalue: in numeric numberofobjects: in numeric index: in endparams end ; trigger createShortcutTo
The extended trigger CreateShortcutTo is fired when a drop with drop action = Create Shortcut occurs.
Dragvalue = The value of the dragged object
Dropformat = The negotiated drop format
Itemvalue = The value of the (tree) item on which the drop occurs; this value will be
"" (empty string) if a drop occurs on a widget, e.g. on a picture widget.
Numberofobjects = (in the case of multiple drop) the number of multiple objects being
dropped
Index = (in the case of multiple drop) the 1-based index of the object being dropped
trigger moveFrom params string dragvalue: in string dropformat: in numeric numberofobjects: in numeric index: in endparams end ; trigger moveFrom
The extended trigger moveFrom is fired on the drag source when a drop with drop action
= Move occurs.
MoveFrom is fired after MoveTo.
MoveFrom and MoveTo are only fired if the drag source and drop target are in different
widgets. Otherwise MoveWithin is used.
Dragvalue = The value of the dragged object
Dropformat = The negotiated drop format
Numberofobjects = (in the case of multiple drop) the number of multiple objects being
dropped
Index = (in the case of multiple drop) the 1-based index of the object being dropped
trigger moveTo params string dragvalue: in string dropformat: in string itemvalue: in numeric numberofobjects: in numeric index: in endparams end ; trigger moveTo
The extended trigger moveTo is fired on the drag source when a drop with drop action =
Move occurs.
MoveTo is fired before MoveFrom.
MoveFrom and MoveTo are only fired if the drag source and drop target are in different
widgets. Otherwise MoveWithin is used.
Dragvalue = The value of the dragged object
Dropformat = The negotiated drop format
Itemvalue = The value of the (tree) item on which the drop occurs; this value will be
"" (empty string) if a drop occurs on a widget, e.g. on a picture widget.
Numberofobjects = (in the case of multiple drop) the number of multiple objects being
dropped
Index = (in the case of multiple drop) the 1-based index of the object being dropped
trigger moveWithin params string dragvalue: in string dropformat: in string itemvalue: in numeric numberofobjects: in numeric index: in endparams end ; trigger moveWithin
The extended trigger moveWithin is fired on the drag source when a drop with drop action = Move occurs, if the drag & drop occurs within the same widget.
Dragvalue = The value of the dragged object
Dropformat = The negotiated drop format
Itemvalue = The value of the (tree) item on which the drop occurs.
Numberofobjects = (in the case of multiple drop) the number of multiple objects being
dropped
Index = (in the case of multiple drop) the 1-based index of the object being dropped
The map widget supports one extended trigger:
trigger ROLLOVER params string rollOvervalue: in endparams end ; trigger_rollover
The extended trigger RollOver is fired when a user moves into a map polygon.
At this point the map widget itself will highlight the polygon.
A possible use for this trigger is to play a sound with the sound Proc statement.
trigger ROLLOVER params string rollOvervalue: in endparams sound /play "ding.wav" end ; trigger_rollover
rollOvervalue = the tagname of the current highlighted hotspot
The picture widget supports Drag & Drop, but has no extended triggers of its own.
See Extended triggers for Drag & Drop
The tree widget supports the following extended triggers, next to the set of extended triggers for Drag & Drop:
Close
Collapse
ColumnSorted
DoubleClick
Expand
Open
RepresentationChanged
trigger Close params string control: in ; TREE | LIST | KEYBOARD string item: in endparams end ; trigger Close
The extended trigger Close if fired when a tree node is closed, i.e. its subordinate tree items will no longer be shown in the listview.
control = TREE if the user clicked in the treeview, LIST if the user clicked in the
listview, KEYBOARD if the user performed s keyboard action
item = The value of the item which was closed
trigger Collapse params string control: in ; TREE | LIST | KEYBOARD string item: in endparams end ; trigger Collapse
The extended trigger Collapse is fired when a tree item is collapsed, i.e. its subordinate tree items are no longer shown in the treeview.
control = TREE if the user clicked in the treeview, LIST if the user clicked in the
listview, KEYBOARD if the user performed s keyboard action
item = The value of the item which was collapsed
trigger columnSorted params numeric columnId: in string sortingOrder: in ; ASC | DESC endparams end ; trigger columnSorted
The extended trigger columnSorted is fired when the user clicks a column header in the listview, thereby sorting the listview according to that column, ascending or descending.
columnId = 1-based index of the column in the listview
sortingOrder = ASC if the sorting is Ascending, DESC if the sorting order is descending
trigger doubleClick params string control: in ; TREE | LIST | KEYBOARD string item: in endparams end ; trigger doubleClick
The extended trigger is fired when the user double-clicks a tree or list item.
control = TREE if the user clicked in the treeview, LIST if the user clicked in the
listview, KEYBOARD if the user performed s keyboard action
item = The value of the item which was double-clicked
trigger Expand params string control: in ; TREE | LIST | KEYBOARD string item: in endparams end ; trigger Expand
The extended trigger Expand is fired when a tree item is expanded, i.e. its subordinate tree items are shown in the treeview.
control = TREE if the user clicked in the treeview, LIST if the user clicked in the
listview, KEYBOARD if the user performed s keyboard action
item = The value of the item which was expanded
trigger Open params string control: in ; TREE | LIST | KEYBOARD string item: in endparams end ; trigger Open
The extended trigger Open if fired when a tree node is opened, i.e. its subordinate tree items will be shown in the listview.
control = TREE if the user clicked in the treeview, LIST if the user clicked in the
listview, KEYBOARD if the user performed s keyboard action
item = The value of the item which was opened
trigger representationChanged params string itemValue: in string control: in ; TREE | LIST string newRepresentation: in endparams variables string treeItem, listUpdate endvariables getitem/id treeItem, $fieldvalrep, itemValue putitem treeItem, 3, newRepresentation ; Change representation listUpdate = "0=" ; Indicate partial valrep update putitem/id listUpdate, itemValue, treeItem $fieldvalrep = listUpdate end ; trigger representationChanged
The extended trigger representationChanged will only be fired if the widget property
INLINEEDIT is TRUE.
It can be used to allow in-line editing of the tree widget.
itemValue = value of the item's which representation was changed
control = TREE if the item was changed in the treeview, LIST if it was changed in the
listview
newRepresentation = the representation text entered by the user
See How to Make an editable tree widget