How to Disable a Button in Oracle Forms

Use set_item_property built-in to disable a button in Oracle Forms. It takes three arguments object name, property name, and the setting. Below are the syntax and example:


set_item_property('block.object_name', property, setting);

Disable a Push Button in Oracle Forms Example

Suppose you have created a push button named button_save in the block named control and you want to disable it whenever a form activates on the screen. In this case, write the following code in the when-new-form-instance trigger in Oracle Forms.

set_item_property('control.button_save', enabled, property_false);

Now upon opening of this form, the button button_save will be disabled.

To enable the same button on any other event use the following command:

set_item_property('control.button_save', enabled, property_true);

See also:

What do you think?

289 Points
Upvote Downvote

C# For Loop Example

How to Check First and Last Record in Oracle Forms?