Board index » cppbuilder » Grouping RadioButtons and RadioGroups on a Form

Grouping RadioButtons and RadioGroups on a Form

Hi,

I'm using controls at runtime in my program. One of the controls is
RadioButtons.  I can do this without problems but all of my
RadioButtons belong to the same "parent".   I would like to assign
groups of RadioButtons to seperate RadioGroups but if I do this at
runtime then I can't see them on the Form I'm working with. In other
words if I set the RadioButton's Parent to a RadioGroup control then I
can nolonger see my RadioButton on the Screen.  I don't want the
RadioGroups visible and I don't manually place them. I just want
multiple RadioButtons in seperate control groups. Is there an easy way
to do this?   Thanks, Keith.

 

Re:Grouping RadioButtons and RadioGroups on a Form


Quote
"Keith Wade" <kw...@prodigy.net> wrote in message news:3c06bdc2$1_1@dnews...
> I would like to assign groups of RadioButtons to seperate RadioGroups but
if I
> do this at runtime then I can't see them on the Form I'm working with. In
other
> words if I set the RadioButton's Parent to a RadioGroup control then I
> can nolonger see my RadioButton on the Screen.

Is the group itself visible (it's Visible property set to true)?  If a
parent is not visible, neither will it's child controls be, either

You could also try using a TPanel instead, and set both it's BorderInner and
BorderOuter properties to bnNone.

Quote
> I don't want the RadioGroups visible and I don't manually place them. I
just want
> multiple RadioButtons in seperate control groups. Is there an easy way
> to do this?

An alternative would be to use a group of TSpeedButton controls instead of
TRadioButton.  Set their AllowAllUp property to false (if desired) and make
sure they all have the same value for their GroupIndex property.  If you
don't like the look of raised/lowered buttons, you can set their Flat
property to true and then use a bitmap in their Glyph property to mimic what
a RadioButton looks like.

Gambit

Re:Grouping RadioButtons and RadioGroups on a Form


Quote
"Remy Lebeau" <gambi...@gte.net> wrote:

>"Keith Wade" <kw...@prodigy.net> wrote in message news:3c06bdc2$1_1@dnews...

>> I would like to assign groups of RadioButtons to seperate RadioGroups but
>if I
>> do this at runtime then I can't see them on the Form I'm working with. In
>other
>> words if I set the RadioButton's Parent to a RadioGroup control then I
>> can nolonger see my RadioButton on the Screen.

>Is the group itself visible (it's Visible property set to true)?  If a
>parent is not visible, neither will it's child controls be, either

>You could also try using a TPanel instead, and set both it's BorderInner and
>BorderOuter properties to bnNone.

>> I don't want the RadioGroups visible and I don't manually place them. I
>just want
>> multiple RadioButtons in seperate control groups. Is there an easy way
>> to do this?

>An alternative would be to use a group of TSpeedButton controls instead of
>TRadioButton.  Set their AllowAllUp property to false (if desired) and make
>sure they all have the same value for their GroupIndex property.  If you
>don't like the look of raised/lowered buttons, you can set their Flat
>property to true and then use a bitmap in their Glyph property to mimic what
>a RadioButton looks like.

>Gambit

Thanks for the reply. I hadn't considered using SpeedButtons but I think I'll have to try that approach.  I Want the RadioButtons to be visible on my form but I don't want the Panel(s) or GroupBox(s) to be visible so I guess I can't use regular TRadioButtons.  

Re:Grouping RadioButtons and RadioGroups on a Form


Not for multiple button groups, no.  Not without a grouping component to put
them in.

Gambit

Quote
"Keith Wade" <kw...@prodigy.net> wrote in message news:3c06f37f$1_2@dnews...
> I Want the RadioButtons to be visible on my form but I don't want the
Panel(s)
> or GroupBox(s) to be visible so I guess I can't use regular TRadioButtons.

Other Threads