[Overview][Constants][Types][Classes][Procedures and functions][Index] |
[Properties (by Name)] [Methods (by Name)] [Events (by Name)]
Maintains an association between a control, an action, and a field in a linked dataset.
Source position: dbctrls.pp line 43
type TFieldDataLink = class(TDataLink) |
||
protected |
||
procedure ActiveChanged; override; |
|
ActiveChanged - method to process changes in the Active property. |
procedure EditingChanged; override; |
|
EditingChanged - method for processing changes in the Editing property. |
procedure LayoutChanged; override; |
|
LayoutChanged- called if layout is changed: tests validity of field then calls OnLayoutChange event handler. |
procedure RecordChanged(); override; |
|
RecordChanged - triggered if the contents of the current record change; calls Reset. |
procedure UpdateData; override; |
|
Signals the OnUpdateData event handler for pending changes to the linked dataset. |
procedure FocusControl(); override; |
|
FocusControl gives the input focus to the data-aware control in the class instance. |
public |
||
constructor Create; |
|
Constructor for the class instance. |
function Edit; |
|
Edit - if the field can be modified, performs inherited Edit and shows editing status. |
procedure Modified; |
|
Updates the class when the linked dataset enters an edit state. |
procedure Reset; |
|
Reset - checks that link is active, calls the OnDataChange event handler then sets IsModified to False. |
property Control: TComponent; [rw] |
|
The Control to which this datalink is attached. |
property Field: TField; [r] |
|
The Field to which the datalink is attached. |
property FieldName: string; [rw] |
|
FieldName - the name of the attached field, stored as a string. |
property CanModify: Boolean; [r] |
|
CanModify - True if the linked field is capable of being modified. |
property Editing: Boolean; [r] |
|
Editing - True if the linked field is being edited. |
property EditingSource: Boolean; [r] |
|
Indicates if the data link is changing its source properties. |
property OnDataChange: TNotifyEvent; [rw] |
|
OnDataChange - event handler for a change in the data. |
property OnEditingChange: TNotifyEvent; [rw] |
|
OnEditingChange - event handler for a changed in the Editing property. |
property OnUpdateData: TNotifyEvent; [rw] |
|
OnUpdateData - event handler for updating any pending changes in the data. |
property OnActiveChange: TNotifyEvent; [rw] |
|
OnActiveChange - event handler for a change in the Active property. |
end; |
|
Maintains an association between a control, an action, and a field in a linked dataset. |
|
| | ||
TDataLink |
||
? | ||
TObject |
TFieldDataLink is a TDataLink descendant which maintains an association between a control, an action, and a field in a linked dataset. TFieldDataLink extends the ancestor class to provide additional properties, methods, and events useful when working with a data-aware control linked to a field in a dataset.
The following key properties are added in the class:
The following events are added in the class:
TFieldDataLink is used in the implementation of several data-aware controls. In most cases, it is used in an internal member and not exposed in the interface for the control. It can, however, be used as a public or published property.
|
TDBLookup - used as source of data by TDBLookupListBox or TDBLookupComboBox, to find data from a lookup table. |
|
|
TDBEdit - a data-aware edit box for processing a single text-string from a dataset. |
|
|
Displays a string value stored in a dataset field. |
|
|
TDBRadioGroup - a data-aware version of TRadioGroup, providing a series of mutually exclusive buttons to select an entry to insert into a database field. |
|
|
Implements a data-aware checkbox control. |
|
|
TDBMemo - a data-aware Memo box to process the multi-line text of a single field in a dataset. |
|
|
TDBGroupBox - a data-aware version of TGroupBox, allowing a number of data-aware objects to be grouped together on a form. |
|
|
TDBImage - a data-aware Image box to display a single image from a dataset. |
|
|
TDBCalendar - a data-aware version of TCalendar, for selecting a date to store in a database field. |
|
|
TCustomDBComboBox is a data-aware combo-box for displaying information from a database. |
|
TDataLink |
lazarus-ccr.sourceforge.net |