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
Barcode 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.
Browser 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.
Button Click n/a The user tabs or clicks to select the button. The user tabs or clicks out of the button.
Calendar Double-click n/a The user tabs or clicks into the calendar. The user tabs or clicks out of the calendar.
Chart n/a n/a n/a n/a
CheckBox Click Click The user tabs or clicks into the component. The user tabs or clicks out of the component.
ComboBox 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.
DataView¹ n/a n/a n/a n/a
DateCombo 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.
Diagram² n/a n/a n/a n/a
DropList 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.
Edit 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.
FlexLayout³ n/a n/a n/a n/a
FormPage n/a n/a n/a n/a
Gauge Form loads Form is refreshed Primary event fires n/a
Grid Double-click n/a The user tabs or clicks into the component. The user tabs or clicks out of the component.
GridColumn 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.
GridColumn with check box style Click Click The user tabs or clicks into the component. The user tabs or clicks out of the component.
GroupBox n/a n/a n/a n/a
HyperLinkButton Click n/a n/a n/a
Infocon Click n/a The user tabs or clicks into the component. The user tabs or clicks out of the component.
List 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.
MenuItem Click item on Actions menu n/a n/a n/a
MultilineEdit 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.
Notebook n/a n/a n/a n/a
NotebookTab The tab becomes current. n/a The user tabs or clicks into the component. The user tabs or clicks out of the component.
RadioButton Click Click The user tabs or clicks into the component. The user tabs or clicks out of the component.
Static n/a n/a n/a n/a
SubForm 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.
ToolbarButton Click n/a n/a n/a
Tree Double-click The user selects a node in the tree. n/a n/a
UserControl Click var. var. var.
VerticalGrid 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.