diff --git a/kivy/uix/boxlayout.py b/kivy/uix/boxlayout.py index 8f0f99c2f..b650a454f 100644 --- a/kivy/uix/boxlayout.py +++ b/kivy/uix/boxlayout.py @@ -190,3 +190,17 @@ class BoxLayout(Layout): c.width = w c.height = h y += h + spacing + + def add_widget(self, widget, index=0): + widget.bind( + size=self._trigger_layout, + size_hint=self._trigger_layout, + pos_hint=self._trigger_layout) + return super(Layout, self).add_widget(widget, index) + + def remove_widget(self, widget): + widget.unbind( + size=self._trigger_layout, + size_hint=self._trigger_layout, + pos_hint=self._trigger_layout) + return super(Layout, self).remove_widget(widget)