set control set value

I have two radio buttons in a control group. I I want to set a value to one of these this should be the correct syntax:

if riskKontakt = true then mainwindow.totalKontakt(0).Value = true else mainwindow.totalKontakt(1).value = True end if

Riskcontact is a global boolean var which is TRUE. The set doesn’t react on false or true… ?

It works fine for me. Are you sure you’re actually calling the above routine?

Yes, checked a zillion times in the debugger…

Do you mean it may be TRUE or FALSE?

Do the buttons have the same parent? Can you describe what happens that you think shouldn’t happen? It would help make a better guess at your problem.

Found it. I had this situation: in a groupbox I had 3 control sets, each of them consisting of 2 radiobuttons, which had to take the value of 3 global boolean vars. Only the last control set got checked. That made my think about radio buttons in a groupbox.

What I didn’t know is that in a groupbox apparently only ONE radiobutton can have a TRUE value EVEN if they belong to different control sets. My thought was to put them in different control sets to overcome this problem…

Put each set on a Rectangle or Canvas on top of the groupbox. Canvas is invisible, but it might be good to have a visual separation between the groups.