Consultor Eletrônico



Kbase 19511: ADM2 - How to Add Custom Button to SmartToolBar
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   07/02/2000
The proper way to add an action to the toolbar is through the
defineAction method.

Note that this is a "class property" and will be a valid action for all toolbars (if you have more than one).

The define action has three parameters:

1) unique action name
2) comma-separated list of fields to update
3) chr(1) separated list of values for these fields

You could take a look in action.p initAction to see how all the current actions are defined.

If you wanted to define a new button for example for print, you would override initAction and do something similar to the following:

RUN SUPER.

defineAction('Print':U,
'Name,Caption,Image,Type,OnChoose':U,
'Print' + chr(1) +
'Print record' + chr(1) +
'print.bmp' + chr(1) +
'PUBLISH':U + chr(1) +
'printRecord':U).