This object is in trash! 

Use count of 'checked' checkboxes in a variable to control corresponding UI controls?

Troy Surdick shared this question 5 years ago
Answered

Is there a way to count the number of "checked" checkboxes, and use that count to enable/disable related UI controls? (Example, if 0 or 1 checked, disable a corresponding drop-down list and button; if 3 or more checked, )?


I'm trying to use a variable ("checked_count") with default value of 0. When I 'check' one of the checkboxes, I'm adding a conditional event (if IsChecked = true, then (checked_count = checked_count + 1). Else, (checked_count = checked_count - 1). My thinking is that I would then be able to use the value of checked_count to set active panel, or enable/disable controls as needed. However, I don't seem to be having much success.


Can anyone please weigh in on whether or not what I'm thinking is sound? (I'm new to Justinmind, so it would be helpful to know if I'm just completely off base...)


Thanks!