RichEdit Class

RichEdit Class

This Package | All Packages

Component
  |
  +--Control
    |
    +--RichEdit
public class RichEdit
extends Control

The RichEdit class encapsulates a Win32 RichEdit control. The topics in this section are currently under construction.

Fields
Name Description
EM_GETPARAFORMAT Represents the message that is submitted to this control to retrieve the control's paragraph format setting.
EM_SETPARAFORMAT Represents the message that is submitted to this control to set the paragraph format.
EM_SETTARGETDEVICE Represents the message that is submitted to this window to set the target device and line width used for WYSIWYG (what you see is what you get) formatting in a RichEdit control.
ES_SAVESEL Topic under construction.
ES_SELECTIONBAR Topic under construction.
PFA_CENTER Indicates that paragraphs are centered in the control.
PFA_LEFT Indicates that paragraphics are aligned with the left margin.
PFA_RIGHT Indicates that paragraphs are aligned with the right margin.
PFM_ALIGNMENT Topic under construction.
PFM_NUMBERING Topic under construction.
PFM_OFFSET Topic under construction.
PFM_OFFSETINDENT Topic under construction.
PFM_RIGHTINDENT Topic under construction.
PFM_STARTINDENT PARAFORMAT mask values
PFM_TABSTOPS Topic under construction.
PFN_BULLET Indicates that the paragraph is bulleted.

Constructors
Name Description
RichEdit() Constructs a RichEdit control.

Methods
Name Description
GetParaFormat(PARAFORMAT pf) Topic under construction.
GetParaFormatSelection() Topic under construction.
getReadOnly() Retrieves a boolean value that indicates whether this control is read-only.
getSelectedText() Retrieves the currently selected text, and returns it in a String object.
getSelectionEnd() Retrieves the zero-based index of the last character in the current selection.
getSelectionStart() Retrieves the zero-based index of the first character in the current selection.
select(int start, int end) Selects the text within the specified range.
selectAll() Selects all characters in the RichEdit control.
SetParaFormat(PARAFORMAT pf) Topic under construction.
setReadOnly(boolean value) Specifies whether the RichEdit control is read-only.
setSelectedText(String value) Replaces the currently selected text with the specified text.
setSelectionEnd(int value) Specifies the zero-based index of the last character of a text selection in the RichEdit control.
setSelectionStart(int value) Specifies the zero-based index of the first character of a text selection in the RichEdit control.
setTargetDevice(int hdc, int nLineWidth) Sets the target device and line width used for WYSIWYG (what you see is what you get) formatting in a RichEdit control.

Fields

RichEdit.EM_GETPARAFORMAT

Syntax
public static final int EM_GETPARAFORMAT;
Description
Represents the message that is submitted to this control to retrieve the control's paragraph format setting.

RichEdit.EM_SETPARAFORMAT

Syntax
public static final int EM_SETPARAFORMAT;
Description
Represents the message that is submitted to this control to set the paragraph format.

RichEdit.EM_SETTARGETDEVICE

Syntax
public static final int EM_SETTARGETDEVICE;
Description
Represents the message that is submitted to this window to set the target device and line width used for WYSIWYG (what you see is what you get) formatting in a RichEdit control.

RichEdit.ES_SAVESEL

Syntax
public static final int ES_SAVESEL;
Description
Topic under construction.

RichEdit.ES_SELECTIONBAR

Syntax
public static final int ES_SELECTIONBAR;
Description
Topic under construction.

RichEdit.PFA_CENTER

Syntax
public static final int PFA_CENTER;
Description
Indicates that paragraphs are centered in the control.

RichEdit.PFA_LEFT

Syntax
public static final int PFA_LEFT;
Description
Indicates that paragraphics are aligned with the left margin.

RichEdit.PFA_RIGHT

Syntax
public static final int PFA_RIGHT;
Description
Indicates that paragraphs are aligned with the right margin.

RichEdit.PFM_ALIGNMENT

Syntax
public static final int PFM_ALIGNMENT;
Description
Topic under construction.

RichEdit.PFM_NUMBERING

Syntax
public static final int PFM_NUMBERING;
Description
Topic under construction.

RichEdit.PFM_OFFSET

Syntax
public static final int PFM_OFFSET;
Description
Topic under construction.

RichEdit.PFM_OFFSETINDENT

Syntax
public static final int PFM_OFFSETINDENT;
Description
Topic under construction.

RichEdit.PFM_RIGHTINDENT

Syntax
public static final int PFM_RIGHTINDENT;
Description
Topic under construction.

RichEdit.PFM_STARTINDENT

Syntax
public static final int PFM_STARTINDENT;
Description
PARAFORMAT mask values

RichEdit.PFM_TABSTOPS

Syntax
public static final int PFM_TABSTOPS;
Description
Topic under construction.

RichEdit.PFN_BULLET

Syntax
public static final int PFN_BULLET;
Description
Indicates that the paragraph is bulleted.

Constructors

RichEdit.RichEdit

Syntax
public RichEdit();
Description

Constructs a RichEdit control.

Methods

RichEdit.GetParaFormat

Syntax
public void GetParaFormat( PARAFORMAT pf );
Description

Topic under construction.

RichEdit.GetParaFormatSelection

Syntax
public PARAFORMAT GetParaFormatSelection();
Description

Topic under construction.

RichEdit.getReadOnly

Syntax
public boolean getReadOnly();
Return Value

Returns true, if the control is read-only; Otherwise, returns false.

Description

Retrieves a boolean value that indicates whether this control is read-only.

RichEdit.getSelectedText

Syntax
public String getSelectedText();
Return Value

Returns the currently selected text, if text is selected; Otherwise, returns null.

Description

Retrieves the currently selected text, and returns it in a String object.

RichEdit.getSelectionEnd

Syntax
public int getSelectionEnd();
Return Value

Returns the zero-based index of the last character in the selection

Description

Retrieves the zero-based index of the last character in the current selection.

RichEdit.getSelectionStart

Syntax
public int getSelectionStart();
Description

Retrieves the zero-based index of the first character in the current selection.

RichEdit.select

Syntax
public void select( int start, int end );
Parameters
start
The zero-based index of the character with which to begin the selection.
end
The zero-based index of the character with which to end the selection.
Description

Selects the text within the specified range.

RichEdit.selectAll

Syntax
public void selectAll();
Description

Selects all characters in the RichEdit control.

RichEdit.SetParaFormat

Syntax
public void SetParaFormat( PARAFORMAT pf );
Description

Topic under construction.

RichEdit.setReadOnly

Syntax
public void setReadOnly( boolean value );
Parameters
value
A boolean value that indicates whether the control is read-only.
Description

Specifies whether the RichEdit control is read-only.

RichEdit.setSelectedText

Syntax
public void setSelectedText( String value );
Parameters
value
The text with which to replace the selected text.
Description

Replaces the currently selected text with the specified text.

RichEdit.setSelectionEnd

Syntax
public void setSelectionEnd( int value );
Parameters
value
The zero-based index of the character at which the selection ends.
Description

Specifies the zero-based index of the last character of a text selection in the RichEdit control.

RichEdit.setSelectionStart

Syntax
public void setSelectionStart( int value );
Parameters
value
The zero-based index of the character at which the selection begins.
Description

Specifies the zero-based index of the first character of a text selection in the RichEdit control.

RichEdit.setTargetDevice

Syntax
public void setTargetDevice( int hdc, int nLineWidth );
Parameters
hdc
Handle to a device context for the target device.
nLineWidth
Line width to use for formatting.
Description

Sets the target device and line width used for WYSIWYG (what you see is what you get) formatting in a RichEdit control.