ForeMethod: String;
The ForeMethod property determines a Fore method that should trigger on handler startup.
Depending on the type of the handler to be set up, a procedure or function with a defined signature should be specified as a property value.
Specify a procedure or function that has one input parameter with the IPrxReport type for a custom button action handler:
Public Sub <Procedure name>(<Report>: IPrxReport);
Public Function <Function name>(<Report>: IPrxReport): <value type>;
To handle the event before clicking a custom button specify the function with the following signature:
Function <Function name>(<Report>: IPrxReport; [Var messageType: Integer]): String;
The messageType optional parameter is used to determine a format of displayed message. If the parameter is not set, a confirmation dialog box is used. To hide the displayed message, set Return to empty value.
Available values of the messageType parameter:
0. Confirmation dialog box. Clicking the Yes button in the dialog box executes the operation specified for the button. Clicking the No button in the dialog box cancels executing of the operation specified for the button.
1. Error. Clicking the OK button in the dialog box does not execute the operation specified for the button.
2. Warning. Clicking the OK button in the dialog box does not execute the operation specified for the button.
3. Information message. Clicking the OK button in the dialog box does not execute the operation specified for the button.
To handle the action after clicking a custom button, specify the procedure with the following signature:
Sub <Procedure name>(<Report>: IPrxReport);
To manage button activity, specify the function with the following signature:
Function <Function name>(<Report>: IPrxReport): Boolean;
The function result will be handled as follows:
True. The button is active.
False. The button is inactive.
The property use is given in the example for the IPrxUserButtons.Add, IPrxUserButtons.AddByType methods.
See also: