Cabbage Logo
Back to Cabbage Site

Radiogroups across groupboxes

Radiogroups don’t seem to operate between groupboxes.

Here’s the test:

form caption("") size(200, 300)
groupbox bounds(  0,  0,200,100), text("1 2") {
checkbox bounds( 30, 40, 40, 40), channel("1"), radiogroup(1), value(1)
checkbox bounds(130, 40, 40, 40), channel("2"), radiogroup(1)
groupbox bounds(  0,100,200,100), text("3 4") {
checkbox bounds( 30, 40, 40, 40), channel("3"), radiogroup(1)
checkbox bounds(130, 40, 40, 40), channel("4"), radiogroup(1)
instr 1
f0 z

The two sets of checkboxes in each groupbox act as independent radiogroups. If each groupbox is reduced to containing just a single checkbox they get stuck in the on position. It seems a radiogroup of one is not a good idea.

As far as I remember, radio groups are specific to their parents and can’t be used across different plants. On the other hand, if you remove the plants, all checkboxes will belong to the same parent and should work fine.