MCPcopy Create free account
hub / github.com/alpha2phi/python-apps / showcase_gridlayout

Method showcase_gridlayout

gui-apps/app_kivy.py:154–170  ·  view source on GitHub ↗
(self, layout)

Source from the content-addressed store, hash-verified

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('''
164Button:
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',

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected