docs: add example for signal's object attribute

This commit is contained in:
Gleb Smirnov 2022-01-14 13:29:48 +03:00 committed by liferooter
parent 492b73bc47
commit c0c4ae3fc9

View file

@ -201,6 +201,22 @@ Flags
clicked => on_button_clicked() swapped; clicked => on_button_clicked() swapped;
} }
Object
~~~~~~
By default the widget is passed to callback as first argument. However,
you can specify another object to use as first argument of callback.
.. code-block::
Gtk.Entry {
activate => grab_focus(another_entry);
}
Gtk.Entry another_entry {
}
CSS Styles CSS Styles
---------- ----------