Board index » delphi » tRadioGroup

tRadioGroup

How can I access the "Checked" property of a tRadioButton in a
tRadioGroup?

i.e.

        Form2.RadioGroup1.Items[1].Checked:=true;

(I know this code is wrong! :)

Thanks

--

martin brooks, support manager
proteus the internet consultancy
<---------------------------------------------------------------------->
< mailto:mar...@proteusweb.c             26 britton st london ec1m 5nq >
< http://www.proteusweb.com                         tel: 0171 689 6666 >
< direct: 0171 689 6678                             fax: 0171 689 6667 >
< reg no: 3169362                                       vat: 675007732 >
<---------------------------------------------------------------------->

  vcard.vcf
< 1K Download
 

Re:tRadioGroup


Martin -

Quote
>How can I access the "Checked" property of a tRadioButton in a
>tRadioGroup?

>i.e.

>    Form2.RadioGroup1.Items[1].Checked:=true;

Take a look at the online help for TRadioGroup->Properties->ItemIndex.  I quote:

"Indicates which radio button in the group is currently selected."

--
Clayton Neff
Software Project Leader
The Personal Marketing Company, Inc.
11843 West 83rd Terrace
Lenexa, KS  66214
(913)492-0322
clay...@tpmco.com

Re:tRadioGroup


I believe this can be done with

TRadioButton(Form2.radiogroup1.items[i]).checked:=true;

since you first have to let delphi know what kind of component Items[i] is

HTH

  Roel

Quote
Martin Brooks <mar...@proteusweb.com> wrote:

: How can I access the "Checked" property of a tRadioButton in a
: tRadioGroup?

: i.e.

:       Form2.RadioGroup1.Items[1].Checked:=true;

: (I know this code is wrong! :)

: Thanks

: --

: martin brooks, support manager
: proteus the internet consultancy
: <---------------------------------------------------------------------->
: < mailto:mar...@proteusweb.c             26 britton st london ec1m 5nq >
: < http://www.proteusweb.com                         tel: 0171 689 6666 >
: < direct: 0171 689 6678                             fax: 0171 689 6667 >
: < reg no: 3169362                                       vat: 675007732 >
: <---------------------------------------------------------------------->

Other Threads