Highlight a Kivy ToggleButton with mouse hovering
I am currently coding a GUI with Kivy. I need to modify a ToggleButton behaviour so that it is highlighted when hovered by the mouse. Here is my code so far: class FilterToggle(ToggleButton): def __init__(self, **kwargs): Window.bind(mouse_pos=self.on_mouse_pos) super(FilterToggle, self).__init__(**kwargs) def on_mouse_pos(self, *args): pos = args[1] if self.collide_point(*pos): print("I am on the good path!) Here is my .kv file: <FilterToggle>: text_size: self.width - 20, None valign: 'middle' halign: 'left' markup: True . . . FilterToggle: text: "This is just to illustrate" The on_mouse_pos(