[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proxy for RadioButton


Le 20/09/2024 à 21:40, BB a écrit :

On 21/9/24 4:57 am, Jussi Lahtinen wrote:
Not sure what happens there... maybe you could provide a small runnable project to demonstrate the problem? I think RadioButton should behave the same no matter where it is. Maybe I miss something.

Jussi

On Tue, Sep 17, 2024 at 12:58 PM BB <adamnt42@xxxxxxxxx <mailto:adamnt42@xxxxxxxxx>> wrote:

    Is there any way to have the RadioButton's mutex nature exposed
    through
    its proxy (or otherwise)?

    I'm using the RadioButton in a custom control, so when that
    control is
    inside a container the mutex nature is gone.

    regards

    bruce


The class (say NewRadio) inherits UserContainer, it has a RadioButton as one of its Children and the Proxy is set to the Radio Button.

If I put a NewRadio control in say a Frame on a form then the mutex is gone because there are layers of containers between the Frame and the RadioButton. To try and simplify:

[ Form [ Frame [ NewRadio1 [ _UserContainer [ RadioButton ] ] ]

                [ NewRadio2 [ _UserContainer [ RadioButton ] ] ] ] ]


So the RadioButtons are in different containers and the mutex doesn't work.

I had solved this many years ago in some now long gone project and I cant recall anything about how I did it. I thought someone else may have solved it.

regards

bruce



Ah, I think I see your problem: indeed, radio buttons act as radio buttons (i.e. "mutex") only for the other radio buttons in the same container. So if you put your radio button alone in a container, it will be useless.

Regards,

--
Benoît Minisini.


References:
Proxy for RadioButtonBB <adamnt42@xxxxxxxxx>
Re: Proxy for RadioButtonJussi Lahtinen <jussi.lahtinen@xxxxxxxxx>
Re: Proxy for RadioButtonBB <adamnt42@xxxxxxxxx>