Xbasic

A5_SPELLCHECKSTRING Function

Syntax

Results as P = a5_SpellCheckString(C string [,C string_type [,C string_rtf [,L show_done_button [,C ignore_words [,C replace_all_words ]]]]])

Arguments

Results

A dot variable containing the results of the spell check, including the last button pressed by the user.

string

The text to examine.

string_type

The type of text. Possible values are: "text" = plain text "rtf" = RTF encoded text

string_rtf

Optional. Default = "". The RTF encoded equivalent of the String parameter.

show_done_button

Logical. Optional. Default = .T.

ignore_words

Optional. Default = "". Words to ignore in the text.

replace_all_words

Optional. Default = "". Words that need to be replaced in the text.

Description

Spell check a text string or a rtf text string. For RTF, must supply plain_text and rtf_text strings.

Discussion

The A5_SPELLCHECKSTRING() function opens the Spell Check dialog box and returns a dot variable containing the results of the spell check operation.

Example 

The following example creates some RTF text then spell checks it.

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.}}}"

Limitations

Desktop applications only.

See Also