I put three group boxes on winform window. Each of those group boxes has two radio buttons. I can't choose a radio button in each group box, only one of all radio buttons. Is there a solution except using checkboxes but this is complicated.
Zeljko
Radio buttons in few group boxes
Radio buttons in few group boxes
I just made the attached aef, where i can set in each group one button. Maybe you find in the code the difference to your app?
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Radio buttons in few group boxes
Hi Zeljko,
Are you sure this is a WinForms window and not a VO window like a DataWindow? Because in WinForms, this is handled automatically, as long as every radio button is trully "inside" the groupbox, so if you move around the groupbox in the designer, then the radios (and any other controls inside them) are moved together. If they are not, it means the parent for both the groups and the radios is the form, and you need to drag & drop again the radios to put them "inside" the groups.
Are you sure this is a WinForms window and not a VO window like a DataWindow? Because in WinForms, this is handled automatically, as long as every radio button is trully "inside" the groupbox, so if you move around the groupbox in the designer, then the radios (and any other controls inside them) are moved together. If they are not, it means the parent for both the groups and the radios is the form, and you need to drag & drop again the radios to put them "inside" the groups.
Chris Pyrgas
XSharp Development Team
chris(at)xsharp.eu
XSharp Development Team
chris(at)xsharp.eu
Radio buttons in few group boxes
Karl,
I imported your sample app and added few lines of code to check default radio buttons in each group box and it works as I expected. The same I did in my app, but only one could be checked.
Then I removed radio buttons from groupboxes and later put them in groupboxes again as Chris suggested.
Now everything works fine.
Thanks,
Zeljko
I imported your sample app and added few lines of code to check default radio buttons in each group box and it works as I expected. The same I did in my app, but only one could be checked.
Then I removed radio buttons from groupboxes and later put them in groupboxes again as Chris suggested.
Now everything works fine.
Thanks,
Zeljko
Radio buttons in few group boxes
Zeljko,
did you compare the code? Could it be you initially added radio buttons to the form, and later on grouped them? I'd think if so, the painter didn't/couldn't know that it had to add the code which makes the rb belong to each's group...
did you compare the code? Could it be you initially added radio buttons to the form, and later on grouped them? I'd think if so, the painter didn't/couldn't know that it had to add the code which makes the rb belong to each's group...
Regards
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Karl
(on Win8.1/64, Xide32 2.20, X#2.20.0.3)
Radio buttons in few group boxes
Karl,
it seems that I didn't put radio buttons initially inside group box but probably outside and then moved inside. Maybe, cut/paste. When I deleted them and put new ones from toolbox directly to group box everything works fine.
Zeljko
it seems that I didn't put radio buttons initially inside group box but probably outside and then moved inside. Maybe, cut/paste. When I deleted them and put new ones from toolbox directly to group box everything works fine.
Zeljko