kivymd.uix¶
API - kivymd.uix
¶
-
class
kivymd.uix.
MDAdaptiveWidget
(**kwargs)¶ Widget class. See module documentation for more information.
- Events
- on_touch_down: (touch, )
Fired when a new touch event occurs. touch is the touch object.
- on_touch_move: (touch, )
Fired when an existing touch moves. touch is the touch object.
- on_touch_up: (touch, )
Fired when an existing touch disappears. touch is the touch object.
- on_kv_post: (base_widget, )
Fired after all the kv rules associated with the widget and all other widgets that are in any of those rules have had all their kv rules applied. base_widget is the base-most widget whose instantiation triggered the kv rules (i.e. the widget instantiated from Python, e.g.
MyWidget()
).Changed in version 1.11.0.
Warning
Adding a __del__ method to a class derived from Widget with Python prior to 3.4 will disable automatic garbage collection for instances of that class. This is because the Widget class creates reference cycles, thereby preventing garbage collection.
Changed in version 1.0.9: Everything related to event properties has been moved to the
EventDispatcher
. Event properties can now be used when contructing a simple class without subclassingWidget
.Changed in version 1.5.0: The constructor now accepts on_* arguments to automatically bind callbacks to properties or events, as in the Kv language.
-
adaptive_height
¶ If True, the following properties will be applied to the widget:
size_hint_y: None height: self.minimum_height
adaptive_height
is anBooleanProperty
and defaults to False.
-
adaptive_width
¶ If True, the following properties will be applied to the widget:
size_hint_x: None width: self.minimum_width
adaptive_width
is anBooleanProperty
and defaults to False.
-
adaptive_size
¶ If True, the following properties will be applied to the widget:
size_hint: None, None size: self.minimum_size
adaptive_size
is anBooleanProperty
and defaults to False.
-
on_adaptive_height
(self, instance, value)¶
-
on_adaptive_width
(self, instance, value)¶
-
on_adaptive_size
(self, instance, value)¶