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

Method showcase_boxlayout

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

Source from the content-addressed store, hash-verified

136 Clock.schedule_once(add_button)
137
138 def showcase_boxlayout(self, layout):
139
140 def add_button(*t):
141 if not layout.get_parent_window():
142 return
143 if len(layout.children) > 5:
144 layout.orientation = 'vertical'\
145 if layout.orientation == 'horizontal' else 'horizontal'
146 layout.clear_widgets()
147 layout.add_widget(Builder.load_string('''
148Button:
149 text: self.parent.orientation if self.parent else ''
150'''))
151 Clock.schedule_once(add_button, 1)
152 Clock.schedule_once(add_button)
153
154 def showcase_gridlayout(self, layout):
155

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected