srvmemo TSRVMemo

<< Click to display table of contents >>

srvmemo TSRVMemo

TSRVMemo is a multiline plain-text edit control.

TSRVMemo edits Unicode text in all versions of Delphi.

Unit SRVMemo;

Syntax

TSRVMemo = class(TCustomSRVEdit)

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TSRVWinControl

TSRVEditControl

TCustomSRVEdit

Properties and events

This component publishes the following new properties and properties inherited from TCustomSRVEdit:

Property

Type

Default value

Meaning

published Alignment

TAlignment

taLeftJustify

Horizontal text alignment (left/right/center). RTL BiDiMode inverts left and right alignments.

published CharCase

TSRVEditCharCase

srvecNormal

Determines the case of the text within the edit control:

srvecNormal, srvecUpperCase, srvecLowerCase

published HScrollBarSchemeIndex

Integer

0

An index in SkinManager.CurrentSkin.HorizontalScrollBarSchemes collection, allows applying skins to a horizontal scrollbar

published Lines

TSRVMemoStrings

 

Contains the individual lines of text in the memo control. Lines contain Unicode strings for all versions of Delphi.

WordWrap affects how Text is split into Lines.

published MaxLength

Integer

0

Specifies the maximum number of characters the user can enter into the edit control (0 for unlimited)

published ReadOnly

Boolean

False

Determines whether the user can change the text of the edit control.

published ScrollBars

TScrollStyle

ssNone

Determines whether the memo control has scroll bars.

published SRVControlStyle

TSRVControlStyle

srvcsSimple

Defines a visual appearance (affects borders and scroll bars).

published Text

 

 

Contains a text displayed by the editor (the same text as accessible by Lines).

published VScrollBarSchemeIndex

Integer

0

An index in SkinManager.CurrentSkin.VerticalScrollBarSchemes collection, allows applying skins to a vertical scrollbar

published WantReturns

Integer

True

Determines whether the user can insert return characters into the text.

published WantTabs

Boolean

False

Determines whether the user can insert tab characters into the text.

published WordWrap

Boolean

True

Determines whether the edit control automatically breaks lines so that the text wraps to fit the control's window.

DrawOnPrint;

SkinManager;

EditSkinSchemeIndex;

SkinFontIndex;

EnabledBorderColor, DisabledBorderColor, MouseInBorderColor, FocusedBorderColor (all colors are used only if SRVControlStyle = rvsrvcsClassic)

DisabledBorderWidth, EnabledBorderWidth, MouseInBorderWidth, FocusedBorderWidth;

properties inherited from TWinControl.

Painting

If skins are not defined:

The border around the editor has width defined in DisabledBorderWidth, EnabledBorderWidth, MouseInBorderWidth, FocusedBorderWidth properties. When auto-sizing the editor, it is assumed that the border width is equal to EnabledBorderWidth.

A border color depends on the editors state (normal, disabled, under the mouse pointer, focused) and SRVControlStyle: TSRVControlStyle property. If it is equal to srvcsSimple, colors are defined by RVControlsPainter (see the TRichView manual). If it is equal to srvcsClassic, colors are defined in EnabledBorderColor, DisabledBorderColor, MouseInBorderColor, FocusedBorderColor properties.

If SkinManager is assigned:

the control is drawn using SkinManager.CurrentSkin.BoxSchemes[EditSkinSchemeIndex];

the horizontal scroll bar is drawn using SkinManager.CurrentSkin.HorizontalScrollBarSchemes[HScrollBarSkinSchemeIndex];

the vertical scroll bar is drawn using SkinManager.CurrentSkin.VerticalScrollBarSchemes[VScrollBarSkinSchemeIndex];

font is defined in SkinManager.CurrentSkin.Fonts[SkinFontIndex].