About generating events for components
You can define events to be generated when the user interacts with a component. Most components support a primary event, a data-change event, a gain-focus event, and a lose-focus event. For instance, you might want to generate a custom event when the user clicks a push button. To do this, specify the custom event name as the push button's primary event.
This table describes the actions for which events for some common types of components can be generated:
Component | Primary event | Data-change event* | Gain-focus event | Lose-focus event |
---|---|---|---|---|
n/a | The user modifies the data to be used to create the bar code. | The user tabs or clicks into the barcode component. | The user tabs or clicks out of the barcode component. | |
n/a | The user modifies the data being used by the browser. | The user tabs or clicks into the component. | The user tabs or clicks out of the component. | |
Click | n/a | The user tabs or clicks to select the button. | The user tabs or clicks out of the button. | |
Double-click | n/a | The user tabs or clicks into the calendar. | The user tabs or clicks out of the calendar. | |
n/a | n/a | n/a | n/a | |
Click | Click | The user tabs or clicks into the component. | The user tabs or clicks out of the component. | |
Double-click | The user modifies the data in the edit box or the user selects an item from the list that is different from the previous value of the component. | The user tabs or clicks into the component. | The user tabs or clicks out of the component. | |
¹ | n/a | n/a | n/a | n/a |
Double-click | The user modifies the data in the edit box and tabs or clicks away; or the user selects a date from the drop-down calendar that is different from the previous value of the component. | The user tabs or clicks into the component. | The user tabs or clicks out of the component. | |
² | n/a | n/a | n/a | n/a |
Double-click | The user selects an item from the list that is different from the previously selected item. | The user tabs or clicks into the component. | The user tabs or clicks out of the component. | |
Double-click | The data in the component has been modified, and the user tabs or clicks out of the component. | The user tabs or clicks into the component. | The user tabs or clicks out of the component. | |
³ | n/a | n/a | n/a | n/a |
n/a | n/a | n/a | n/a | |
Form loads | Form is refreshed | Primary event fires | n/a | |
Double-click | n/a | The user tabs or clicks into the component. | The user tabs or clicks out of the component. | |
without check box style | Double-click | The user modifies the data in the edit box and tabs or clicks away; or the user selects an item from the list that is different from the previous value of the component. | The user tabs or clicks into the component. | The user tabs or clicks out of the component. |
with check box style | Click | Click | The user tabs or clicks into the component. | The user tabs or clicks out of the component. |
n/a | n/a | n/a | n/a | |
Click | n/a | n/a | n/a | |
Click | n/a | The user tabs or clicks into the component. | The user tabs or clicks out of the component. | |
Double-click | The user selects an item from the list that is different from the previously selected item. | The user tabs or clicks into the component. | The user tabs or clicks out of the component. | |
Click item on | menun/a | n/a | n/a | |
Double-click | The data in the component has been modified, and the user tabs or clicks out of the component. | The user tabs or clicks into the component. | The user tabs or clicks out of the component. | |
n/a | n/a | n/a | n/a | |
The tab becomes current. | n/a | The user tabs or clicks into the component. | The user tabs or clicks out of the component. | |
Click | Click | The user tabs or clicks into the component. | The user tabs or clicks out of the component. | |
n/a | n/a | n/a | n/a | |
User tabs or clicks on the subform. | Changes to the parent form linked to the subform. | The user tabs or click into the subform. | The user clicks aware from the subform. | |
Click | n/a | n/a | n/a | |
Double-click | The user selects a node in the tree. | n/a | n/a | |
Click | var. | var. | var. | |
Double-click | n/a | The user tabs or clicks into the component. | The user tabs or clicks out of the component. |
If a component's validator fails for a data-change event, the data change does not complete.
¹ For information about how to set up DataView actions that have the ability to fire events on right-click menus within the DataView's output, see the topic "Setting up the right-click menu for DataViews". Also, in the Datasource Binding property of a DataView component, there are mappings for events to fire on these actions: Row Selected, Refresh, and Get More Rows.
² For more information, see the help topic "About Diagram components". It is possible on the diagram, as a whole, as well as the individual shapes within the diagram, that you can have right-click menus assigned to them, which could fire events.
³ FlexLayout components do not inherently have events. However, if there are components that have events, such as Edit components, within a region on a Flexlayout, those events will fire.