Methods

All ACUCOBOL-GT controls have properties and styles. In addition to properties and styles, ActiveX and .NET controls have a concept known as methods. In ActiveX and .NET, methods (also known as object methods) specify the functions that the control provides. To invoke (call) a method, you use the MODIFY verb in much the same way that you set a property or style.

Note: Unlike common properties and styles, you cannot use the DISPLAY statement to set a special property or invoke a method of an ActiveX or .NET control defined in the Screen Section. You must use the MODIFY verb.

Both ActiveX and .NET methods can take any number of parameters or no parameters. ActiveX controls can also take optional parameters (that is, parameters that can be omitted). You specify the parameters in COBOL by enclosing them in parentheses. With ActiveX controls, the optional parameters are always last. If a method takes only one parameter, the parentheses may be omitted. If a method takes no parameters, you must use empty parentheses (( )).

Note that ActiveX and .NET properties and methods should always be prepended with an @ character in case they clash with COBOL reserved words or ACUCOBOL-GT graphical control property and style names. @ identifies the relationship of the name to ActiveX or .NET.