EventBox#

class ignis.widgets.Widget.EventBox(*args: Any, **kwargs: Any)#

Bases: Box

The same Box, but it can receive events.

Widget.EventBox(
    child=[Widget.Label(label='this is eventbox'), Widget.Label(label="It can contain multiple child as Widget.Box")],
    vertical=True,
    homogeneous=False,
    spacing=52,
    on_click=lambda self: print("clicked!"),
    on_right_click=lambda self: print("right clicked!"),
    on_middle_click=lambda self: print("middle clicked!"),
    on_hover=lambda self: print("hovered!"),
    on_hover_lost=lambda self: print("hover lost((("),
    on_scroll_up=lambda self: print("scrolled up!"),
    on_scroll_down=lambda self: print("scrolled down!")
)
property on_click: Callable#
  • optional, read-write

The function to call on left click.

property on_right_click: Callable#
  • optional, read-write

The function to call on right click.

property on_middle_click: Callable#
  • optional, read-write

The function to call on middle click.

property on_hover: Callable#
  • optional, read-write

The function to call on hover.

property on_hover_lost: Callable#
  • optional, read-write

The function to call on hover lost.

property on_scroll_up: Callable#
  • optional, read-write

The function to call on scroll up.

property on_scroll_down: Callable#
  • optional, read-write

The function to call on scroll down.