## Package Win32::GUI::RichEdit

Back to the Packages

- Constructor

  - new Win32::GUI::RichEdit(PARENT, %OPTIONS)

- Methods

  - BackColor([COLOR])

  - CharFromPos(X, Y)

  - FirstVisibleLine()

  - GetCharFormat([FLAG])

  - GetTextRange(START, LENGTH)

  - LineFromChar(INDEX)

  - Load(FILENAME, [FORMAT])

  - PosFromChar(INDEX)

  - ReplaceSel(STRING, [FLAG])

  - Save(FILENAME, [FORMAT])

  - Select(START, END)

  - Selection()

  - SetCharFormat(%OPTIONS)

  - SetMaxLength(LENGTH)

  - SetParaFormat(%OPTIONS)

  - SetTextMode(MODE, UNDO)

  - TextLength()

- Events

  - Change()

  - GotFocus()

  - LostFocus()

### Constructor

new Win32::GUI::RichEdit(PARENT, %OPTIONS)

  Creates a new RichEdit object; can also be called as PARENT->AddRichEdit(%OPTIONS).

### Methods

BackColor([COLOR])

  [TBD]

CharFromPos(X, Y)

  Returns a two elements array identifying the character nearest to the position specified by X and Y. The array contains the zero-based index of the character and its line index.

FirstVisibleLine()

  Returns the first visible line in the RichEdit control.

GetCharFormat([FLAG])

  [TBD]

GetTextRange(START, LENGTH)

  Returns LENGTH bytes of text from the RichEdit control, starting at START

LineFromChar(INDEX)

  Returns the line number where the zero-based INDEX character appears.

Load(FILENAME, [FORMAT])

  [TBD]

PosFromChar(INDEX)

  Returns a two elements array containing the x and y position of the specified zero-based INDEX character in the RichEdit control.

ReplaceSel(STRING, [FLAG])

  Replaces the current selection with the given STRING. The optional FLAG parameter can be set to zero to tell the control that the operation cannot be undone; see also Undo().

Save(FILENAME, [FORMAT])

  [TBD]

Select(START, END)

  Selects the characters range from START to END.

Selection()

  Returns a two elements array containing the current selection start and end.

SetCharFormat(%OPTIONS)

  [TBD]

SetMaxLength(LENGTH)

  Sets the RichEdit control's maximum length (up to 2GB)

SetParaFormat(%OPTIONS)

  [TBD]

SetTextMode(MODE, UNDO)

  Sets the RichEdit control's text mode

TextLength()

  Returns the text length of the RichEdit control

### Events

Change()

  Sent when the text in the field is changed by the user.

GotFocus()

  Sent when the control is activated.

LostFocus()

  Sent when the control is deactivated.