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

# TDBMemo

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

TDBMemo - a data-aware Memo box to process the multi-line text of a single field in a dataset

## Declaration

Source position: dbctrls.pp line 798

`type TDBMemo = class(TCustomMemo)`
`protected`
`function GetReadOnly; override;` |  | GetReadOnly - returns the boolean ReadOnly status
`procedure SetReadOnly(); override;` |  | SetReadOnly - specifies whether ReadOnly applies
`function WordWrapIsStored; override;` |  | WordWrapIsStored - returns True if the WordWrap flag is stored
`procedure DataChange(); virtual;` |  | DataChange - if Data changed, loads the new data into the appropriate part of the Field
`procedure ActiveChange(); virtual;` |  | ActiveChange - if the data link is active, transmit the changed data to the sender
`procedure Notification(); override;` |  |
`procedure UpdateData(); virtual;` |  | UpdateData - if data changed, copy new text via the datalink
`procedure FocusRequest(); virtual;` |  | FocusRequest - a request has been received, so focus is given
`procedure Loaded; override;` |  |
`procedure Change; override;` |  | Change - software emulation of the OnChange event
`procedure KeyPress(); override;` |  | KeyPress - simulates the action of pressing the specified key
`procedure WndProc(); override;` |  | WndProc - message handler for the procedure of this window
`public`
`constructor Create(); override;` |  | Create - constructor for TDBMemo: calls inherited Create, then sets style and forms datalinks and actions
`destructor Destroy; override;` |  | Destroy - destructor for TDBMemo: frees datalinks then calls inherited Destroy
`procedure EditingDone; override;` |  | EditingDone - if link allows modifications and is in an Editing state, updates data via the link then calls inherited EditingDone
`procedure LoadMemo; virtual;` |  | LoadMemo - tries to load data from current field as a string if possible, otherwise returns an exception
`property Field: TField; [r]` |  | The field in the DataSet to which this control is to be linked. Can be referred to by name, or as an index
`published`
`property Align;` |  | Used to align the control to the top, bottom, left or right of its client.
`property Anchors;` |  | The set of anchor definitions for this control
`property AutoDisplay: Boolean; [rw]` |  | AutoDisplay - if True, automatically displays the data when loaded
`property BorderSpacing;` |  | Determines the border spacing for this control
`property BorderStyle;`
`property Color;` |  | Determine the colour for the current control
`property DataField: String; [rw]` |  | The name of the field, as a string (ie cannot be referred to as an Index)
`property DataSource: TDataSource; [rw]` |  | The DataSource from which information is obtained to display in this control. Usually the result of a database query
`property DragCursor;` |  | DragCursor - the style of cursor to be used during the Drag process
`property DragMode;` |  | DragMode - whether manual or automatic
`property Font;` |  | The Font to be used for text in this control
`property Lines;` |  | Lines : an array of strings (single lines of characters) which contains the text held or being entered in the Memo
`property MaxLength;` |  | MaxLength : maximum length allowed for text string
`property OnChange;` |  | OnChange - event handler for any change in text
`property OnDragDrop;` |  | Event handler for the Drag-Drop manoeuvre
`property OnDragOver;` |  | Event handler for the case when a control is dragged over another control
`property OnEndDrag;` |  | Event handler for the end of a dragging process
`property OnEnter;` |  | OnEnter - event handler for when the mouse enters the control, and the control receives focus
`property OnExit;` |  | OnExit - event handler for when the mouse leaves the control and it loses focus
`property OnKeyDown;` |  | OnKeyDown - event handler for instance when key is down while control has focus
`property OnKeyPress;` |  | OnKeyPress - event controller for a key being pressed while the control has focus. To properly handle national chars use UTF8KeyPress instead.
`property OnKeyUp;` |  | OnKeyUp - event handler for instance when a key is up (not pressed) while the control has focus
`property OnStartDrag;` |  | Event handler for start of dragging process
`property OnUTF8KeyPress;` |  | UTF8KeyPress - event controller for a key being pressed while the control has focus.
`property ParentFont;` |  | ParentFont - should the control use the same font as the parent? Default is true
`property PopupMenu;` |  | PopupMenu - a context-sensitive menu that pops up when the right mouse button is clicked over this control
`property ReadOnly: Boolean; [rw]` |  | ReadOnly - the contents of the edit box may only be read, not written or erased
`property ScrollBars;` |  | Whether the Memo has ScrollBars - none, horizontal or vertical or both, or automatically placed if needed
`property TabOrder;` |  | The place this control occupies in the list of tabs
`property Tabstop;` |  | Is the control in the sequence of controls accessed by successive presses of the Tab key?
`property Visible;` |  | Visible - can the control be seen?
`property WordWrap; [s]` |  | Is WordWrap enabled, allowing long words to be carried on to the next line?
`end;`

## Inheritance

`TDBMemo` |  | TDBMemo - a data-aware Memo box to process the multi-line text of a single field in a dataset
`TCustomMemo`
?
`TObject`

## See also

HowToUseDataAwareControls |  | HowToUseDataAwareControls - Hints for accessing databases

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