From c0c4ae3fc9e3166d0a71e4d423f2354db2febdb4 Mon Sep 17 00:00:00 2001 From: Gleb Smirnov Date: Fri, 14 Jan 2022 13:29:48 +0300 Subject: [PATCH] docs: add example for signal's object attribute --- docs/examples.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/examples.rst b/docs/examples.rst index e12cdee..3498aa0 100644 --- a/docs/examples.rst +++ b/docs/examples.rst @@ -201,6 +201,22 @@ Flags 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 ----------