Top
PowerCOBOL V11.0 User's Guide
FUJITSU Software

5.4.5 Inserting Methods

You may insert a method in the Editor by highlighting the name of the control whose method you wish to manipulate.

Right-click the mouse on the highlighted control name and select Insert Method from the pop-up menu (or select Method from the Edit menu).

A second pop-up menu will appear that lists the available methods for the highlighted control.

Select the name of the method you wish to manipulate. The method name will be placed to the left of the highlighted control name in the proper syntax using a COBOL INVOKE statement (similar to a COBOL CALL statement). Any required parameters will be noted as well for you to fill in.

For example, if you wish to create a Move method for a PowerCOBOL Image Control named CmImage1, highlight CmImage1 in the Editor (or type in the string "CmImage1" if it is not present). You may alternatively drag the control named CmImage1 from the form into the Editor window to have its name inserted at the cursor position.

Once the control name has been highlighted in the Editor, right-click the mouse on it and select Insert Method from the pop-up menu (or select Method from the Edit menu).

Select the method you wish to insert (in this example, the "Move" method). The current line in the Editor will be modified as follows:

	INVOKE CmImage1 "Move" USING Left Top [Width] [Height]

You need to ensure that the parameters for Left and Top contain the left and top screen coordinates where you want the image moved to on the screen. The optional image "Width" and "Height" parameters may be specified as well. The brackets placed around these parameters indicate that they are optional parameters.