A script-enabled browser is required for this page to function properly.

Manipulating Buttons at Runtime

Oracle Forms provides triggers that you can use to respond to interface events that occur when the end user manipulates a button.

Executing Button Code

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

Setting Button Properties Programmatically

You can set and get button properties programmatically with the following Built-in subprograms:


About buttons

Creating a button

When-Button-Pressed Trigger