Vcl.DBCtrls.TDBRadioGroup

From RAD Studio API Documentation
Jump to: navigation, search

Vcl.ExtCtrls.TCustomRadioGroupVcl.StdCtrls.TCustomGroupBoxVcl.Controls.TCustomControlVcl.Controls.TWinControlVcl.Controls.TControlSystem.Classes.TComponentSystem.Classes.TPersistentTDBRadioGroup

Delphi

TDBRadioGroup = class(TCustomRadioGroup)

C++

class PASCALIMPLEMENTATION TDBRadioGroup : public Vcl::Extctrls::TCustomRadioGroup

Properties

Type Visibility Source Unit Parent
class public
Vcl.DBCtrls.pas
Vcl.DBCtrls.hpp
Vcl.DBCtrls Vcl.DBCtrls

Description

TDBRadioGroup represents a group of radio buttons connected to a database.

Use TDBRadioGroup to group a set of data-aware radio buttons. Radio buttons that are contained directly in the same control component are said to be "grouped"; when a radio button is checked, all other radio buttons in its group become unchecked. Database radio groups provide an easy way to ensure that the user enters one (or at most one) of the options presented for a field. They are also useful for displaying data from fields that have only a few possible values.

To add radio buttons to a TDBRadioGroup, edit the Items property in the Object Inspector. Each string in Items makes a radio button appear in the group box with the string as its caption.

When the user selects a radio button, the "value" of the selected button becomes the contents of the linked field for the current record in the dataset. Specify values for the buttons by editing the Values property in the Object Inspector; the first string in Values corresponds to the first string in Items, and so forth. If no Values strings are set, each button's caption serves as its value.

See Also