RAD Studio VCL Reference
|
TDBRadioGroup represents a group of radio buttons connected to a database.
TDBRadioGroup = class(TCustomRadioGroup);
class TDBRadioGroup : public TCustomRadioGroup;
DBCtrls
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.
Restricting Field Values with Radio Controls
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|