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

TFieldDataLink.FocusControl

FocusControl gives the input focus to the data-aware control in the class instance.

Declaration

Source position: dbctrls.pp line 75

protected procedure TFieldDataLink.FocusControl(

  aField: TFieldRef

); override;

Arguments

aField

  

Reference to the field expected for the focused control.

Description

FocusControl is an overridden procedure used to give input focus to the data-aware Control for the class instance.

AField is a reference to the TField which defines the field for the data-aware control. AField must be assigned, and point to the Field used in the class instance. No actions are performed in the method if either condition is not met.

FocusControl can be used for any Control descended from TWinControl where its CanFocus value is True; the SetFocus method in the Control is called to receive the input focus.

See also

TFieldDataLink.Control

  

The Control to which this datalink is attached.

TFieldDataLink.Field

  

The Field to which the datalink is attached.

TWinControl.CanFocus

  

Is this control allowed to receive the focus when parent form is visible?

TWinControl.SetFocus

  

Ensures that the control or window handle has focus.


Version 4.0 Generated 2025-05-03 Home