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

type TDBRadioGroup = class(TCustomRadioGroup)

protected

  procedure Change; virtual;

  

Signals the OnChange event handler when assigned.

  procedure Notification(); override;

  

Sets the DataSource to Nil when the control is destroyed.

  procedure DataChange();

  

Updates the control display value when the linked dataset is repositioned.

  procedure UpdateData();

  

Updates the linked dataset using the current selection in the control.

  property DataLink: TFieldDataLink; [r]

  

Provides access to properties, methods, and events for the data-aware control.

  function GetButtonValue();

  

Gets the value for the radio button at the specified position in the control.

  procedure UpdateRadioButtonStates; override;

  

Updates the linked dataset to reflect the current radio button selected in the control.

public

  constructor Create(); override;

  

Constructor for the class instance.

  destructor Destroy; override;

  

Destroy is the destructor for the class instance.

  procedure EditingDone; override;

  

Performs actions needed when the user has finished editing.

  function ExecuteAction(); override;

  

Implements support for standard actions in the control.

  function UpdateAction(); override;

  

Updates the specified action to reflect the current state in the linked dataset.

  property Field: TField; [r]

  

The DataSet Field relevant to the data being selected.

  property ItemIndex: Integer;

  

Ordinal position for the selected radio button in the group.

  property Value: string; [rw]

  

The value for the selected radio button in the control.

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 AutoFill: Boolean;

  

Indicates if radio buttons are resized to fill the available space in the control.

  property AutoSize: Boolean;

  

Allows automatic adjustment of the size for the control, according to its content.

  property BiDiMode: TBiDiMode;

  

Customization (of text controls) in bidirectional reading environments.

  property BorderSpacing: TControlBorderSpacing;

  

Determines the inner and outer border spacing for this control.

  property Caption: TCaption;

  

Text displayed as the caption for the control.

  property ChildSizing: TControlChildSizing;

  

Parameters for child control arrangement and spacing.

  property Color: TColor;

  

The background color of the control.

  property ColumnLayout: TColumnLayout;

  

Fill direction for columns on the grouped control.

  property Columns: Integer;

  

Number of columns displayed for the radio buttons on the control.

  property Constraints: TSizeConstraints;

  

The minimum and maximum Width and Height for the control.

  property DataField: string; [rw]

  

Name of the Field in the linked dataset where the control Value is stored.

  property DataSource: TDataSource; [rw]

  

Provides access to the linked dataset and the field definition used in the control.

  property DoubleBuffered: Boolean;

  

Allows to reduce flicker in the painting of the control.

  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 Font: TFont;

  

The font to be used for text display in this control.

  property Items: TStrings; [w]

  

Contains the string values used as captions for radio buttons in the grouped data-aware control.

  property OnChange: TNotifyEvent; [rw]

  

Event Handler signalled when the Value for the control is changed.

  property OnChangeBounds: TNotifyEvent;

  

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

  property OnClick: TNotifyEvent;

  

Notification handler for mouse clicks.

  property OnContextPopup: TContextPopupEvent;

  

Invoked when a context-sensitive pop-up menu is requested.

  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;

  

Event handler for mouse entering the area of the control.

  property OnMouseLeave: TNotifyEvent;

  

Event handler for mouse leaving the area of the control.

  property OnMouseMove: TMouseMoveEvent;

  

Event handler for mouse movement within the control.

  property OnMouseUp: TMouseEvent;

  

Event handler for mouse button going up.

  property OnMouseWheel: TMouseWheelEvent;

  

Event handler for mouse wheel turned.

  property OnMouseWheelDown: TMouseWheelUpDownEvent;

  

Event handler for downward movement of mouse wheel.

  property OnMouseWheelUp: TMouseWheelUpDownEvent;

  

Event handler for upward movement of the mouse wheel.

  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;

  

Allows to use the BiDiMode settings in the Parent control. Default is true.

  property ParentColor: Boolean;

  

Use the Color from the Parent control, when enabled.

  property ParentDoubleBuffered: Boolean;

  

Value from the DoubleBuffered property in a Parent control.

  property ParentFont: Boolean;

  

If true, the Font of the control will be the same as the one from the Parent. Default is true.

  property ParentShowHint: Boolean;

  

If true, the value of ShowHint for the control will be the same as the one from the Parent. Default is true.

  property PopupMenu: TPopupMenu;

  

A context-sensitive menu that pops up when the right mouse button is clicked over this control.

  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 ShowHint: Boolean;

  

Enables the Hint display.

  property TabOrder: TTabOrder;

  

Determines the sequence of control navigation when the user presses the Tab key.

  property TabStop: Boolean;

  

Allows the user to navigate to this control, by pressing the Tab key.

  property Values: TStrings; [rw]

  

The values of the strings in Items.

  property Visible: Boolean;

  

Indicates if the control is visible on its parent.

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

  

TCustomRadioGroup is 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 which have an associated widget.

|

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 run-time, 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

How To Use Data-aware Controls

  

HowToUseDataAwareControls - Hints for accessing databases.

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