[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 344

type TDBRadioGroup = class(TCustomRadioGroup)

protected

  procedure Change; virtual;

  

  procedure Notification(); override;

  

  procedure DataChange();

  

  procedure UpdateData();

  

  property DataLink: TFieldDataLink; [r]

  

  function GetButtonValue();

  

  procedure UpdateRadioButtonStates; override;

  

  procedure Loaded; override;

  

public

  constructor Create(); override;

  

Create a new instance of the Window Control

  destructor Destroy; override;

  

Destroy this instance of the Window Control, and return the resources used

  procedure EditingDone; override;

  

  property Field: TField; [r]

  

The DataSet Field relevant to the data being selected

  property ItemIndex;

  

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;

  

Used to align the control in one of four directions.

  property Anchors;

  

The set of anchor definitions for this control

  property BorderSpacing;

  

Determines the border spacing for this control

  property Caption;

  

Caption - the text-string appearing on the Control, usually used to identify its function

  property Columns;

  

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;

  

DragCursor - the style of cursor to be used during the Drag process

  property DragMode;

  

DragMode - whether manual or automatic

  property Enabled;

  

Whether the control is Enabled. If not, it usually appears 'greyed-out'

  property Items; [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;

  

Event handler for a change in bounds of the control

  property OnClick;

  

Event Handler for mouse click

  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 OnMouseDown;

  

Event handler for when a mouse button is pressed down

  property OnMouseMove;

  

Event handler for mouse movement within the current control

  property OnMouseuP;

  

Event handler for when the mouse button is released, ie "up"

  property OnResize;

  

Event Handler for resize of control

  property OnStartDrag;

  

Event handler for start of dragging process

  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;

  property Values: TStrings; [rw]

  

The values of the strings in Items

  property Visible;

  

Visible - can the control be seen?

end;

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

?

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