Главная страница | назад





Article #15811: Disabling a member of a Radio Group

 Question and Answer Database

FAQ811C.txt   Disabling a member of a Radio Group
Category   :VCL
Platform    :All
Product    :C++Builder  1.x

Question:

I'm trying to disable a member of a group of radio buttons in 
a TRadioGroup, and i'm trying to do something like this:

RadioGroup->Items[3]->Enabled = false;

but i can't, because Items is a TStrings.

What do I do?

Answer:

You need to use:

RadioGroup->Controls[0]->Enabled=false;

The Controls member is an unpublished member
which contains an array of TControl pointers
containing all child controls of the control
in question.

This is a member of all children of TWinControl,
but it is not usually published. :)

7/2/98 10:32:32 AM
 

Last Modified: 01-SEP-99