Xbasic
RTF.GET_JUSTIFICATION Function
Syntax
Mode as C = .GET_JUSTIFICATION()
Arguments
- Mode
The justification of the current text. The return values will include:
- "Left"
- "Right"
- "Center"
- "Full"
Description
The .GET_JUSTIFICATION() method returns the justification of the RTF text.
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