GetCharIndexFromPos Method


8.7C, PLBCMP GUI Only

 

The GetCharIndexFromPos method retrieves information about the character closest to a specified point in the client area of an EDITTEXT or RICHEDITTEXT object. The method uses the following format:

 

 

[label]

{object}.GetCharIndexFromPos

[GIVING {return}]:

 

 

 

USING [*Vert=]{vert}:

 

 

 

[*Horz=]{horz}

 

Where:

label

Optional. A Program Execution Label.

object

Required. An EDITTEXT or RICHEDITTEXT object that is accessed.

return

Optional. A Numeric Variable that reports the character index.

vert

Required. A decimal number or Numeric Variable that specifies the vertical number of pixels from the EDITTEXT object's upper-left corner.

horz

Required. A decimal number or Numeric Variable that specifies the horizontal number of pixels from the EDITTEXT object's upper-left corner.

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 character index returned is a one-based offset of the character from the beginning of the object.

  4. When using the PL/B Web Server, this method is not supported.

 

 

See Also: Method Syntax, EDITTEXT Methods, RICHEDITTEXT Methods

 



PL/B Language Reference FindText Method (RICHEDITTEXT) GetDTFlags Method (EDITDATETIME)