Package Win32::GUI::RichEdit

Back to the Packages


Constructor

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

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


Methods

BackColor([COLOR])

Sets the background color of the RichEdit control; if no COLOR is specified, the background color is reset to the default system color.

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]

LineFromChar(INDEX)

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

Load(FILENAME, [FORMAT])

Loads a file named FILENAME into the RichEdit control. By default the file is a RTF (Rich Text Format) file; if you want to load a plain text file, you can set FORMAT to 1.

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])

Saves the content of the RichEdit control in a file named FILENAME. By default the file is a RTF (Rich Text Format) file; if you want to save in a plain text file, you can set FORMAT to 1.

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]

SetParaFormat(%OPTIONS)

[TBD]


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.