Deprecated: set the selection of the single item in this control. Raises ItemCountError if the control does not contain only one item. by_label argument is ignored, and included only for backwards compatibility.
(self, selected, by_label=None)
| 1965 | self._set_selected_state(item, not item.selected) |
| 1966 | |
| 1967 | def set_single(self, selected, by_label=None): |
| 1968 | """Deprecated: set the selection of the single item in this control. |
| 1969 | |
| 1970 | Raises ItemCountError if the control does not contain only one item. |
| 1971 | |
| 1972 | by_label argument is ignored, and included only for backwards |
| 1973 | compatibility. |
| 1974 | |
| 1975 | """ |
| 1976 | deprecation( |
| 1977 | "control.items[0].selected = <boolean>") |
| 1978 | if len(self.items) != 1: |
| 1979 | raise ItemCountError( |
| 1980 | "'%s' is not a single-item control" % self.name) |
| 1981 | self._set_selected_state(self.items[0], selected) |
| 1982 | |
| 1983 | def get_item_disabled(self, name, by_label=False, nr=None): |
| 1984 | """Get disabled state of named list item in a ListControl.""" |
nothing calls this directly
no test coverage detected