4D v16.3

CANCEL

Home

 
4D v16.3
CANCEL

CANCEL 


 

CANCEL  
Does not require any parameters

The CANCEL command is used in form or object methods (or in a subroutine) to:

In the context of data entry, CANCEL performs the same action as if the user had pressed the cancel key (Esc).

CANCEL is commonly executed as a result of a menu command being chosen. CANCEL is also commonly used in the object method of a “no action” button.

It is also often used in the optional close box method for the Open window command. If there is a Control-menu box on a window, ACCEPT or CANCEL can be called, in the method to be executed, when the Control-menu box is double-clicked or the Close menu command is chosen.

CANCEL cannot be queued up. Executing two CANCEL commands in a row from within a method in response to an event would have the same effect as executing only one.

Finally, this command can be used in the On Printing Detail form event, when using the Print form command. In this context, the CANCEL command suspends the printing of the form that is about to be printed, then resumes it on the next page. This mechanism can be used to manage form printing when there is a lack of space or if a page break is required.

Note: This operation differs from that of the PAGE BREAK(*) command that cancels ALL the forms waiting to be printed.

Example  

Refer to the example of the SET PRINT MARKER command.

When the CANCEL command is executed (form or printing cancelled), the system variable OK is set to 0.



See also 

ACCEPT
PAGE BREAK
Print form

 
PROPERTIES 

Product: 4D
Theme: Data Entry
Number: 270

The OK variable is changed by the command

 
HISTORY 

Modified: 4D 2003

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)