Manipulate a button display dynamically

Á

Álvaro Moura

Last updated on Jul 6, 2026

The most interesting feature in Scriptcase, is the manipulation of the display of buttons in applications, with the macro sc_btn_display ("nomebotao", "on / off"):

To see all the macro documentation click here.

We can use this macro to validate users' permissions to use a button, for example:

We have a form with the New, Update and Delete buttons, and the User and Visitor groups.e.

The User will not be allowed to Delete a record and the Visitor will only be able to view the form.
We put the following code in OnLoad:

if([grupo] == 'usuario'){

    sc_btn_display('delete','off');

}else if([grupo]=='visitante'){
    sc_btn_display('delete','off');
    sc_btn_display('update','off');
    sc_btn_display('new','off');

}

See in execution:

User:

Guest: