Oracle Forms provides triggers that you can use to respond to interface events that occur when the end user manipulates a button.
In order for a button to execute or initiate a command, you must attach a When-Button-Pressed trigger that fires when the button is selected.
When the Button Pressed event occurs, that is, when an end user clicks on the button, Oracle Forms executes the code in the When-Button-Pressed trigger.
The following example shows a When-Button-Pressed trigger that calculates a total from the values stored in two text items:
When-Button-Pressed trigger:
:order.total := :order.qty * :order.price
You can set and get button properties programmatically with the following Built-in subprograms: