Board index » delphi » 2 groups in 1 Group?

2 groups in 1 Group?

As you can tell from this question I am new to Delphi, well....actually new
to programming come to think about it.

anyway my question:
how can I have 2 groups of radio buttons in 1 groupbox?

groupbox1___________
|                                      |
| O Radio1 * Radio 2      |
|                                      |
| * Radio3 O Radio 4      |
|                                      |
|________________ __ |

*=Selected
O = not selected

So is it possible to have Radio1 and Radio2 grouped so that they dont affect
Radio3 and Radio4
and Radio3 and Radio4 are grouped and dont affect Radio1 and Radio2 in the
same groupbox?

Hope some one out there can understand this because I am not very good at
explaning things.

 

Re:2 groups in 1 Group?


In article <3vbc8.62854$YA2.7780...@news11-gui.server.ntli.net>,
"Label1.Caption := 'Newbie';" <nos...@myaddy.com> writes:

Quote
>So is it possible to have Radio1 and Radio2 grouped so that they dont affect
>Radio3 and Radio4
>and Radio3 and Radio4 are grouped and dont affect Radio1 and Radio2 in the
>same groupbox?

>Hope some one out there can understand this because I am not very good at
>explaning things.

Place a panel on the TGroupBox with RB3 and RB4 on it, Set the BevelInner and
BevelOuter of the panel to bvNone, so it is not visible. Then you will have
independent operation of the two RB pairs.

Alan Lloyd
alangll...@aol.com

Re:2 groups in 1 Group?


Quote
Label1.Caption := 'Newbie'; wrote in message

<3vbc8.62854$YA2.7780...@news11-gui.server.ntli.net>...

Quote
>As you can tell from this question I am new to Delphi, well....actually
new
>to programming come to think about it.

>anyway my question:
>how can I have 2 groups of radio buttons in 1 groupbox?

>groupbox1___________
>|                                      |
>| O Radio1 * Radio 2      |
>|                                      |
>| * Radio3 O Radio 4      |
>|                                      |
>|________________ __ |

>*=Selected
>O = not selected

>So is it possible to have Radio1 and Radio2 grouped so that they dont
affect
>Radio3 and Radio4
>and Radio3 and Radio4 are grouped and dont affect Radio1 and Radio2 in the
>same groupbox?

>Hope some one out there can understand this because I am not very good at
>explaning things.

Don't worry, it's clear enough.

There are two things at work here: Windows radiobuttons and Delphi
ones. In the quest to simplify things, the mapping from one to the
other came out a little strained.

Windows radiobuttons have (the equivalent of) a Group property.
Radiobuttons in the same Group are mutually exclusive, between
groups nothing happens.

Delphi radiobuttons infer their grouping from their Parent control.
One parent, one group. I checked quickly and did not see right off
if this can perhaps be overridden, so let's assume for the moment
that it can't (people will not explain how it _can_ be done, which
is fine by me). Then your only option is to work with it, and group
them as you want them with Parent controls that are not immediately
obvious to the {*word*192} eye. You could use two Panels without bevels
and captions, so you don't see them.

Somehow I feel my explanation to be worse than yours.

Groetjes,
Maarten Wiltink

Other Threads