Initialize properties to match active status. The user may have passed custom colours in *check_props* to the constructor, or to `.set_check_props`, so we need to modify the visibility after getting whatever the user set.
(self, actives)
| 1442 | self._observers.process('clicked', self.labels[index].get_text()) |
| 1443 | |
| 1444 | def _init_status(self, actives): |
| 1445 | """ |
| 1446 | Initialize properties to match active status. |
| 1447 | |
| 1448 | The user may have passed custom colours in *check_props* to the |
| 1449 | constructor, or to `.set_check_props`, so we need to modify the |
| 1450 | visibility after getting whatever the user set. |
| 1451 | """ |
| 1452 | self._active_check_colors = self._buttons.get_facecolor() |
| 1453 | if len(self._active_check_colors) == 1: |
| 1454 | self._active_check_colors = np.repeat(self._active_check_colors, |
| 1455 | len(actives), axis=0) |
| 1456 | self._buttons.set_facecolor( |
| 1457 | [ec if active else "none" |
| 1458 | for ec, active in zip(self._active_check_colors, actives)]) |
| 1459 | |
| 1460 | def clear(self): |
| 1461 | """Uncheck all checkboxes.""" |
no test coverage detected