Xbasic

RTF.INSERT_PAGEBREAK Function

Syntax

.INSERT_PAGEBREAK()

Description

The .INSERT_PAGEBREAK() method inserts a page break at the cursor location.

Example 

dim crtf.object as P
dim crtf.text as C
crtf.object = rtf.create(" ")
crtf.object.insert("RTF Text", 1)
crtf.text = crtf.object.rtf_text
ui_dlg_box("Xdialog Sample", <<%dlg%
{rtf=30,10crtf};
{lf};
;
;
;
;
;
;
%dlg%,<<%code%
if a_dlg_button="Left_Justify" then
    crtf.object.left_justify()
    a_dlg_button = ""
end if
if a_dlg_button="Center_Justify" then
    crtf.object.center_justify()
    a_dlg_button = ""
end if
if a_dlg_button="Right_Justify" then
    crtf.object.right_justify()
    a_dlg_button = ""
end if
if a_dlg_button="Full_Justify" then
    crtf.object.full_justify()
    a_dlg_button = ""
end if
if a_dlg_button="Insert_Page_Break" then
    crtf.object.insert_pagebreak()
    a_dlg_button = ""
end if
if a_dlg_button="Get_Justification" then
    just = crtf.object.get_justification()
    ui_msg_box("Justification",just)
    a_dlg_button = ""
end if
%code%)

Limitations

Desktop applications only.

See Also