FindText Method (RICHEDITTEXT)


9.0B, PLBCMP GUI Only

 

The FindText method locates a string of text in the contents of a RICHEDITTEXT object. The method uses the following format:

 

 

[label]

{object}.FindText

[GIVING {return}]:

 

 

 

USING [*Search=]{search}:

 

 

 

[*Text=]{text}[,[*Start=]{start}][:

 

 

 

[*End=]{end}]

 

Where:

label

Optional. A Program Execution Label.

object

Required. A RICHEDITTEXT object that is accessed.

return

Optional. A Numeric Variable that indicates the success or failure of the method.

search

Required. A decimal number or Numeric Variable that specifies the search options.

text

Required. A Character String Variable or literal that specifies the text for whiich to search.

start

Optional. A decimal number or Numeric Variable that specifies the starting character position of the search.

end

Optional. A decimal number or Numeric Variable that specifies the ending character position of the search.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. If the value returned is zero, the ZERO Condition Flag is set.

  2. The OVER and EOS Condition Flags are always cleared.

  3. The {search} value is a constant as defined in PLBMETH.INC or a numeric variable indicating one or more of the following option values:

  4.  

    Value

    Meaning

    $FR_DOWN

    Search from the top to the bottom

    $FR_WHOLEWORD

    Match only whole words

    $FR_MATCHCASE

    Perform a case-sensitive search

     

  1. If the {start} value is not provided, the search starts at the first character.

  2. If the {end} value is not provided, the search ends at the last character.

  3. A return value of zero (0) indicates that the string was not found.

  4. A non-zero return value is the character position at which the string was found.

 

 

See Also: Method Syntax, RICHEDITTEXT Methods

 



PL/B Language Reference Cut Method GetCharIndexFromPos Method