Xbasic

A5_RTF_EDITOR2 Function

Syntax

P a5_rtf_editor2(P fp [,C rtftitle [,C linklist [,L linkeditor [,L readonly [,N cursor_position [,L showfield ]]]]]])

Arguments

fp

A dot variable containing information about the text in the RTF Editor.

rtftitle

Optional. The title of the dialog box

linklist

Optional. Default = "". Internal use only.

linkeditor

Logical. Optional. Default = .F. . Internal use only.

readonly

Logical. Optional. Default = .F. . Internal use only.

cursor_position

Optional. Default = 0. The initial position of the cursor. Numeric

showfield

Logical.

Description

The A5_RTF_EDITOR2() function displays the RTF Editor to edit an RTF text object.

The following example creates some RTF text with the RTF Editor.

dim rtf_text as C
dim plain_text as C
dim rtf as P
rtf = rtf.create("")
? a5_rtf_editor2(rtf)
= insertion_point = 31.000000
lastbutton = "save"
plain_text = rtf.Plain_Text
rtf_text = rtf.Rtf_Text
? plain_text
= "This is RTF text that maye bee spell checked."
? rtf_text
= "{\rtf1\ansi \deff0{\colortbl;\red0\green0\blue0;\red0\green0\blue255;}{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss Arial;}{\f2\fnil Arial;}}{{\f1 \cf1 \fs24 This is }{\b \f2 \cf2 \fs24 RTF text }{\f1 \cf1 \fs24 that }{\i \f1 \cf1 \fs24 maye bee}{\f1 \cf1 \fs24 spell checked.}}}"
? a5_spellcheckstring(plain_text, "rtf", rtf_text)

Limitations

Desktop applications only.

See Also