# AcceptPageBreak

`AcceptPageBreak`

## Description

Whenever a page break condition is met, the procedure is called, and the break is issued or not depending on the returned value. The default implementation returns a value according to the mode selected by SetAutoPageBreak.
This procedure is called automatically and should not be called directly by the application.

## Example

The procedures is overriden in order to obtain a 3 column layout:

    set gcol 0;

    proc SetCol { col } {
         global gcol;

        # Move position to a column
        set gcol $col;
        set x [expr 10+ $col*65];
        SetLeftMargin $x;
        SetX $x;
    }

    proc AcceptPageBreak { } {
        global gcol;
        if {$gcol <2) {
            #Go to next column
            SetCol [expr $gcol +1];
            SetY 10 ;
            return 0;
        } else {
            #Go back to first column and issue page break
            SetCol 0;
            return 1;
        }
    }
    }

    AddPage;
    SetFont Arial "" 12;
    for { set i 1 } {$i<=300} { incr i} {
    	Cell 0 5 "Line $i" 0 1;
    }
    Output;

## See also

SetAutoPageBreak.

Index