sc_btn_label("btn_name", "new_label")


This macro is used to dynamically change the label of the buttons, whether they are created by the developer or Scriptcase's own.

For this, it is necessary to inform two mandatory parameters, 'btn_name' and 'new_label'.

 

Parâmetro Valor Descrição
btn_name

The parameter can be entered using variables (Global or Local) or string (Using Double or Single Quotes)

In bold, here is the example of how the parameter should be entered:

sc_btn_label('update', 'Update Record');

Values accepted in the parameter:

  • String - Protected by single or double quotes. Ex.: 'update'
  • Variables - Local or global. E.g.: $btn_update

Receives the name of the buttons that will have the label changed.

Button names, which are automatically created by Scriptcase, are available below, separated by application.

new_label

The parameter can be entered using variables (Global or Local) or string (Using Double or Single Quotes)

sc_btn_label('update', 'Update Record');

Values accepted in the parameter::

  • String - Protected by single or double quotes. E.g.: 'Update Record'
  • Variables - Local or global. E.g.: $new_label
  • Lang -variable lang. E.g.: {lang_btn_label}

This parameter receives the new label of the button informed in the previous parameter.

In addition to string and variable, it is also possible to use a lang to define the label, enabling the translation of your application's internationalization.

 

Click here and see examples of using the macro.


 

Nombre de los botones de cuadrícula

Buttons Name
Description
first Goes to the first page of the grid.
back Goes to the previous page of the grid.
forward Goes to the next page of the grid.
last Goes to the last page of the grid.
filter Displays the "Filter" button.
pdf Generates colored PDF.
det_pdf Generates a detailed PDF.
pdfbw Generates black and white PDF.
xls Generates the XLS.
xml Generates the XML.
csv Generates the CVS.
rtf Generates the RTF.
word Generates the Word.
json Generates the JSON.
print Displays the "Print" button in the grid.
det_print Displays the "Print" button in detail.
summary Displays the "Summary" button in the grid.
new Displays the "New" button. (if the application has a link for it, or if the form is running in the grid iframe)
insert Displays the "Include" button of the form. (only for forms running in grid´s iframe)
update Displays the "Update" button of the form. (only for forms running in grid´s iframe)
delete Displays the "Delete" button of the form (only for forms running in grid´s iframe)
qsearch Displays the "Quick Search" button in the grid.
dynsearch Displays the "Dynamic Search" button in the grid.
gridsave Displays the "Save Grid" button in the grid.
sel_col Select columns button
sort_col Sort Button

 

Name of Form buttons

Buttons Name
Description
first Goes to the first page of the form.
back Goes to the previous page of the form.
forward Goes to the next page of the form.
last Goes to the last page of the form.
new Displays the "New" button on the form, if it's off the form will starts in insertion mode.
insert Displays the "Include" button of the form.
update Displays the "Update" button of the form.
delete Displays the "Delete" button of the form.
copy Displays the "Copy" button of the form.
pdf Generates PDF file from a form.
print Open the form in print mode.
dynsearch Displays the "Dynamic Search" button in the grid.

 

Name of Control Buttons

Buttons Name
Description
ok Displays the "Ok" button on the control.
exit Displays the "Exit" button on the control.
facebook Displays the "Facebook" button on the control.
twitter Displays the "Twitter" button on the control.
google Displays the "Google+" button on the control.
paypal Displays the "PayPal" button on the control.

 


Exemplo: Parameter with string

sc_btn_label('update', 'Atualizar Registro');

 

Example: Parâmetro com lang

sc_btn_label("update", {lang_btn_label});

 

Example:Parameter with Global variable

[btn_name] = "update";
[label] = "update";
sc_btn_label([btn_name], [label]);

 

Example: Parameter with local variable

$btn_name = "update";
$label= "update";
sc_btn_label($btn_name, $label);