(self, layout)
| 152 | Clock.schedule_once(add_button) |
| 153 | |
| 154 | def showcase_gridlayout(self, layout): |
| 155 | |
| 156 | def add_button(*t): |
| 157 | if not layout.get_parent_window(): |
| 158 | return |
| 159 | if len(layout.children) > 15: |
| 160 | layout.rows = 3 if layout.rows is None else None |
| 161 | layout.cols = None if layout.rows == 3 else 3 |
| 162 | layout.clear_widgets() |
| 163 | layout.add_widget(Builder.load_string(''' |
| 164 | Button: |
| 165 | text: |
| 166 | 'rows: {}\\ncols: {}'.format(self.parent.rows, self.parent.cols)\ |
| 167 | if self.parent else '' |
| 168 | ''')) |
| 169 | Clock.schedule_once(add_button, 1) |
| 170 | Clock.schedule_once(add_button) |
| 171 | |
| 172 | def showcase_stacklayout(self, layout): |
| 173 | orientations = ('lr-tb', 'tb-lr', |
nothing calls this directly
no outgoing calls
no test coverage detected