Win32::GUI::RichEdit - Create and manipulate Richedit controls.
Most of the methods and events that apply to a Textfield also apply to Win32::GUI::RichEdit.
Note that in order for most events to be triggered you must call the SetEventMask() method, to set the events that you want to be triggered. See SetEventMask().
By default Win32::GUI::RichEdit uses Rich Edit 1.0.
Common methods apply to most windows, controls and resources.
Creates a new RichEdit object; can also be called as PARENT->AddRichEdit(%OPTIONS). See new Win32::GUI::Textfield() for %OPTIONS
See also the common options.
Set automatic detection of URLs mode.
Determine if RichEdit can paste a specified clipboard format.
Determine whether there are any actions in redo queue
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.
DisplayBand(LEFT, TOP, RIGHT, BOTTOM)
Displays a portion of a RichEdit's contents, as previously formatted for a device using the EM_FORMATRANGE message.
FindText(STRING, START, END, [FLAG})
Search a string text.
FindWordBreak(START, [FLAG=WB_NEXTBREAK] )
Return a named hash containing the formatting of the current selection if FLAG = SCF_SELECTION (1) or the default character character formatting if FLAG = SCF_DEFAULT (0).
Hash keys (if a hash key doesn't exist, that property varies across the selection):
-bold => 0/1 -italic => 0/1 -underline => 0/1 -strikeout => 0/1 -color => Text color (0xBBGGRR) -name => Font name -size => Character height, in twips (1/1440 of an inch or 1/20 of a printer's point).
Returns a two elements array containing the current selection start and end.
Returns the current selection text
Returns LENGTH bytes of text from the RichEdit control, starting at START
Sets the RichEdit control's maximum length (up to 2GB)
Returns the line number where the zero-based INDEX character appears.
Returns a two elements array containing the x and y position of the specified zero-based INDEX character in the RichEdit control.
More information at http://msdn.microsoft.com/library/en-us/shellcc/platform/commctls/richedit/richeditcontrols/richeditcontrolreference/richeditmessages/em_setoptions.asp Here are some constants for the FORMAT:
0x0001 (SF_TEXT) 0x0002 (SF_RTF) 0x0003 (SF_RTFNOOBJS) 0x0004 (SF_TEXTIZED) 0x0010 (SF_UNICODE) 0x0020 (SF_USECODEPAGE) 0x8000 (SFF_SELECTION) 0x4000 (SFF_PLAINRTF) 1200 is the Unicode code page CP_UTF8 = 65001
Sets the format of the selected text. If there is no selected text sets the format of the insertion point for text subsequently inserted at that point.
-name => font name, -bold => 0/1, -underline => 0/1, -italic => 0/1, -strikeout => 0/1, -height => Character height, in twips (1/1440 of an inch or 1/20 of a printer's point). -color => Text color (0xBBGGRR)
The SetEventMask() method sets the event mask for a rich edit control. The event mask specifies which notification messages the control sends to its parent window. MASK is any combination of:
ENM_CHANGE Sends EN_CHANGE notifications. ENM_CORRECTTEXT Sends EN_CORRECTTEXT notifications. ENM_DRAGDROPDONE Sends EN_DRAGDROPDONE notifications. ENM_DROPFILES Sends EN_DROPFILES notifications. ENM_IMECHANGE Microsoft Rich Edit 1.0 only: Sends EN_IMECHANGE notifications when the IME conversion status has changed. Only for Asian-language versions of the operating system. ENM_KEYEVENTS Sends EN_MSGFILTER notifications for keyboard events. ENM_LINK Rich Edit 2.0 and later: Sends EN_LINK notifications when the mouse pointer is over text that has the CFE_LINK and one of several mouse actions is performed. ENM_MOUSEEVENTS Sends EN_MSGFILTER notifications for mouse events. ENM_OBJECTPOSITIONS Sends EN_OBJECTPOSITIONS notifications. ENM_PROTECTED Sends EN_PROTECTED notifications. ENM_REQUESTRESIZE Sends EN_REQUESTRESIZE notifications. ENM_SCROLL Sends EN_HSCROLL and EN_VSCROLL notifications. ENM_SCROLLEVENTS Sends EN_MSGFILTER notifications for mouse wheel events. ENM_SELCHANGE Sends EN_SELCHANGE notifications. ENM_UPDATE Sends EN_UPDATE notifications. Rich Edit 2.0 and later: this flag is ignored and the EN_UPDATE notifications are always sent. However, if Rich Edit 3.0 emulates Rich Edit 1.0, you must use this flag to send EN_UPDATE notifications.
The default event mask before any is set is ENM_NONE. Returns the previous event mask.
Selects the characters range from START to END.
Sets the RichEdit control's text mode
Returns the text length of the RichEdit control
Common events apply to most windows and controls.
Sent when the text in the field is changed by the user.
Sent when the control is activated.
Sent when the control is deactivated.
Sent when text has exceeded the specified number of characters
Sent when one of the window scrollbars is moved. SCROLLBAR identifies which bar was moved, 0 for horizontal and 1 for vertical.
Sent when an edit control is about to display altered text.
Documentation for Win32::GUI v1.13 created 26 Jul 2016
This document is autogenerated by the build process. Edits made here will be lost. Edit docs/per_package.tpl instead.
For further support join the users mailing list from the website at http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users. There is a searchable list archive at http://sourceforge.net/p/perl-win32-gui/mailman/perl-win32-gui-users/.
Copyright (c) 1997..2016 Aldo Calpini. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.