RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TDBRadioGroup.Values Property

Determines the values of the radio buttons.

Pascal
property Values: TStrings;
C++
__property TStrings Values;

When the user selects a radio button, the "value" of that button is written to the linked field in the database. By default, the value of a button is simply the caption that appears next to it on the screen, as determined by the Items property. 

In some cases, you may want the values of the radio buttons to differ from their captions. For example, if you use radio buttons to represent a database field whose content can be "Y" or "N", you may want the buttons' captions to be "Yes" and "No". In this case, you would enter "Yes" and "No" in the Items list, and enter "Y" and "N" in the Values list. 

You can edit the Values list in the Object Inspector, just as you would the Items list. To keep the buttons' captions as their values, leave the Values property empty. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!