Behaviors¶
Modules and classes implementing various behaviors for buttons etc.
API - kivymd.uix.behaviors
¶
-
class
kivymd.uix.behaviors.
CircularRippleBehavior
¶ Bases:
kivymd.uix.behaviors.ripplebehavior.CommonRipple
Class implements a circular ripple effect.
-
ripple_scale
¶ See
ripple_scale
.ripple_scale
is anNumericProperty
and defaults to 1.
-
lay_canvas_instructions
(self)¶
-
-
class
kivymd.uix.behaviors.
RectangularRippleBehavior
¶ Bases:
kivymd.uix.behaviors.ripplebehavior.CommonRipple
Class implements a rectangular ripple effect.
-
ripple_scale
¶ See
ripple_scale
.ripple_scale
is anNumericProperty
and defaults to 2.75.
-
lay_canvas_instructions
(self)¶
-
-
class
kivymd.uix.behaviors.
HoverBehavior
(**kwargs)¶ Bases:
object
- Events
on_enter
Fired when mouse enter the bbox of the widget.
on_leave
Fired when the mouse exit the widget.
-
hovered
¶ True, if the mouse cursor is within the borders of the widget.
hovered
is anBooleanProperty
and defaults to False.
-
border_point
¶ Contains the last relevant point received by the Hoverable. This can be used in
on_enter
oron_leave
in order to know where was dispatched the event.border_point
is anObjectProperty
and defaults to None.
-
on_mouse_pos
(self, *args)¶
-
on_enter
(self)¶ Fired when mouse enter the bbox of the widget.
-
on_leave
(self)¶ Fired when the mouse exit the widget.
-
class
kivymd.uix.behaviors.
CommonElevationBehavior
(**kwargs)¶ Bases:
object
-
elevation
¶ Elevation value.
elevation
is anAliasProperty
that returns the value forelevation
.
-
-
class
kivymd.uix.behaviors.
CircularElevationBehavior
(**kwargs)¶ Bases:
kivymd.uix.behaviors.elevation.CommonElevationBehavior
-
class
kivymd.uix.behaviors.
RectangularElevationBehavior
¶ Bases:
kivymd.uix.behaviors.elevation.CommonElevationBehavior
-
class
kivymd.uix.behaviors.
BackgroundColorBehavior
¶ Bases:
kivy.uix.widget.Widget
-
r
¶ The value of
red
in thergba
palette.r
is anBoundedNumericProperty
and defaults to 1.0.
-
g
¶ The value of
green
in thergba
palette.g
is anBoundedNumericProperty
and defaults to 1.0.
-
b
¶ The value of
blue
in thergba
palette.b
is anBoundedNumericProperty
and defaults to 1.0.
-
a
¶ The value of
alpha channel
in thergba
palette.a
is anBoundedNumericProperty
and defaults to 0.0.
-
md_bg_color
¶ The background color of the widget (
Widget
) that will be inherited from theBackgroundColorBehavior
class.For example:
Widget: canvas: Color: rgba: 0, 1, 1, 1 Rectangle: size: self.size pos: self.pos
similar to code:
<MyWidget@BackgroundColorBehavior> md_bg_color: 0, 1, 1, 1
md_bg_color
is anReferenceListProperty
and defaults tor
,g
,b
,a
.
-
-
class
kivymd.uix.behaviors.
SpecificBackgroundColorBehavior
(**kwargs)¶ Bases:
kivymd.uix.behaviors.backgroundcolorbehavior.BackgroundColorBehavior
-
background_palette
¶ See
kivymd.color_definitions.palette
.background_palette
is anOptionProperty
and defaults to ‘Primary’.
-
background_hue
¶ See
kivymd.color_definitions.hue
.background_hue
is anOptionProperty
and defaults to ‘500’.
-
specific_text_color
¶ specific_text_color
is anListProperty
and defaults to [0, 0, 0, 0.87].
-
specific_secondary_text_color
¶ specific_secondary_text_color`is an :class:`~kivy.properties.ListProperty
and defaults to [0, 0, 0, 0.87].
-