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

TDBRadioGroup

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

TDBRadioGroup - a data-aware version of TRadioGroup, providing a series of mutually exclusive buttons to select an entry to insert into a database field

Declaration

Source position: dbctrls.pp line 520

type TDBRadioGroup = class(TCustomRadioGroup) end;

protected

  procedure Change; virtual;

  

Change - calls the OnChange event handler if it is assigned

  procedure Notification(); override;

  

  procedure DataChange();

  

DataChange - updates the current Value to reflect a change inthe data

  procedure UpdateData();

  

UpdateData - places the current Value into the data

  property DataLink: TFieldDataLink; [r]

  

DataLink - the field data link to be used for the data

  function GetButtonValue();

  

GetButtonValue - returns the string value of the button associated with the specified index

  procedure UpdateRadioButtonStates; override;

  

UpdateRadioButtonStates - performs the inheited method and ensures that any updates are also reflected via the data link, if it is active and in an Editing state

public

  constructor Create(); override;

  

Create - constructor for TDBRadioGroup: calls inherited Create then forms datalinks and actions

  destructor Destroy; override;

  

Destroy - destructor for TDBRadioGroup: frees links and items, then calls inherited Destroy

  procedure EditingDone; override;

  

EditingDone - updates the record through the datalink, then calls inherited EditingDone

  function ExecuteAction(); override;

  function UpdateAction(); override;

  property Field: TField; [r]

  

The DataSet Field relevant to the data being selected

  property ItemIndex: Integer;

  

The Index value in the list of Items (a stringlist with the names of the selections for radio buttons)

  property Value: string; [rw]

  

The selected value (as indicated by ItemIndex)

published

  property Align: TAlign;

  

Specifies the placement of the control inside its Parent.

  property Anchors: TAnchors;

  

The set of anchor definitions for this control.

  property BiDiMode: TBiDiMode;

  property BorderSpacing: TControlBorderSpacing;

  

Determines the inner and outer border spacing for this control.

  property Caption: TCaption;

  

The text describing the control to the user.

  property Columns: Integer;

  

Columns - the number of columns in which the Items (radio buttons) are to be arranges

  property DataField: string; [rw]

  

The name (as a string) of the Field whose data are linked to the control

  property DataSource: TDataSource; [rw]

  

The DataSource from which relevant Field data are to be linked - usually the result of a database query

  property DragCursor: TCursor;

  

The cursor shape shown while the control is dragged.

  property DragMode: TDragMode;

  

Allows the user to drag the control.

  property Enabled: Boolean;

  

Determines whether the control reacts on mouse or keyboard input.

  property Items: TStrings; [w]

  

Items - a string list containing the captions for the radio boxes

  property OnChange: TNotifyEvent; [rw]

  

Event Handler for any change in the radiogroup selection

  property OnChangeBounds: TNotifyEvent;

  

Event handler for a change of the Bounds of the control.

  property OnClick: TNotifyEvent;

  

Notification handler for mouse clicks.

  property OnDragDrop: TDragDropEvent;

  

This handler determines the action on an drop onto this control, in a drag-drop operation.

  property OnDragOver: TDragOverEvent;

  

Event handler for a control being dragged over this control.

  property OnEndDrag: TEndDragEvent;

  

Notification handler for the end of a dragging operation.

  property OnMouseDown: TMouseEvent;

  

Event handler for mouse button going down.

  property OnMouseEnter: TNotifyEvent;

  property OnMouseLeave: TNotifyEvent;

  property OnMouseMove: TMouseMoveEvent;

  

Event handler for mouse movement within the control.

  property OnMouseUp: TMouseEvent;

  

Event handler for mouse button going up.

  property OnMouseWheel: TMouseWheelEvent;

  property OnMouseWheelDown: TMouseWheelUpDownEvent;

  property OnMouseWheelUp: TMouseWheelUpDownEvent;

  property OnResize: TNotifyEvent;

  

Notification handler for a resize of the control.

  property OnStartDrag: TStartDragEvent;

  

Event handler for the start of a dragging operation.

  property ParentBiDiMode: Boolean;

  property ReadOnly: Boolean; [rw]

  

ReadOnly - if True, data can only be read, not written or modified. (Doesn't really make sense for a RadioGroup!)

  property TabOrder: TTabOrder;

  

Determines the sequence of controls, reachable when the user presses the Tab key.

  property TabStop: Boolean;

  property Values: TStrings; [rw]

  

The values of the strings in Items

  property Visible: Boolean;

  

Allows to show or hide the control, and all of its children.

Inheritance

TDBRadioGroup

  

TDBRadioGroup - a data-aware version of TRadioGroup, providing a series of mutually exclusive buttons to select an entry to insert into a database field

|

TCustomRadioGroup

  

TCustomRadioGroup: the base type for TRadioGroup

|

TCustomGroupBox

  

The base class for TGroupBox, TRadioGroup and TCheckGroup.

|

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 properties of TDBRadioGroup are similar to those of TRadioGroup (and TCustomRadioGroup). Access is obtained to members of the group by selecting (in the Object Inspector) the ellipsis (...) next to the entry Items, and then editing the stringlist.

At runtime, selecting one of the radiobuttons makes the corresponding ItemIndex available to the programmer, and the corresponding string Item gets selected and appears as the string value for the record in that field.

See also

HowToUseDataAwareControls

  

HowToUseDataAwareControls - Hints for accessing databases

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