[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'StdCtrls' (#lcl)

TCustomMemo

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

The base class for multi-line text controls.

Declaration

Source position: stdctrls.pp line 850

type TCustomMemo = class(TCustomEdit) end;

protected

  class procedure WSRegisterClass; override;

  

Registers this component class with the current WidgetSet.

  procedure CreateParams(); override;

  procedure InitializeWnd; override;

  procedure FinalizeWnd; override;

  function RealGetText; override;

  

Returns the contents of Lines.Text

  procedure RealSetText(); override;

  

Replaces Lines.Text.

  function GetCachedText(); override;

  

Returns the cached Text property (FCaption).

  function GetCaretPos; override;

  procedure KeyUpAfterInterface(); override;

  procedure SetCaretPos(); override;

  procedure SetLines();

  procedure SetWantReturns();

  procedure SetWantTabs();

  procedure SetWordWrap();

  procedure SetScrollBars();

  procedure Loaded; override;

  procedure CMWantSpecialKey(); message;

  procedure WMGetDlgCode(); message;

  class function GetControlClassDefaultSize; override;

  procedure UTF8KeyPress(); override;

  function CanShowEmulatedTextHint; override;

public

  constructor Create(); override;

  destructor Destroy; override;

  procedure Append();

  

Appends a line to the text.

  procedure ScrollBy(); override;

  property Lines: TStrings; [rw]

  

An array with one string for every line (paragraph) in the control. Whilst it type is TStrings you cannot store Objects inside it.

  property HorzScrollBar: TMemoScrollbar; [rw]

  

The horizontal scroll bar for this control.

  property VertScrollBar: TMemoScrollbar; [rw]

  

The vertical scroll bar for this control.

  property ScrollBars: TScrollStyle; [rw]

  

Adds vertical and/or horizontal scrollbars to the control.

  property WantReturns: Boolean; [rw]

  

Allows the user to insert Return characters (line breaks) into the text.

  property WantTabs: Boolean; [rw]

  

Allows to enter Tab characters into the text.

  property WordWrap: Boolean; [rw]

  

Allows long logical lines (paragraphs) to wrap into multiple display lines.

Inheritance

TCustomMemo

  

The base class for multi-line text controls.

|

TCustomEdit

  

The base class for controls presenting editable text.

|

TWinControl

  

The base class for controls which can contain other (child) controls.

|

TControl

  

The base class for visible controls.

|

TLCLComponent

  

The base class for LCL components associated with widgets.

|

TComponent

?

TObject

Description

The text in a multi-line control can be accessed in two ways:

The overhead involved with every property depends on the internal representation representation of the text, in the widget. In either case multiple changes to the Text property should be done in a local copy, written back after all changes have been applied.

The logical lines (paragraphs) in Lines do not always match the displayed lines. When WordWrap is True, every paragraph can wrap into multiple display lines.

See also

TCustomMemo.Lines

  

An array with one string for every line (paragraph) in the control. Whilst it type is TStrings you cannot store Objects inside it.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.