docs: no-sync-create

This commit is contained in:
James Westman 2022-01-29 20:10:31 -06:00
parent 9873a2072b
commit cd12c94423
2 changed files with 5 additions and 5 deletions

View file

@ -165,8 +165,8 @@ the same file.
Binding Flags Binding Flags
~~~~~~~~~~~~~ ~~~~~~~~~~~~~
Use the ``sync-create`` keyword to cause a bound property to be initialized Use the ``no-sync-create`` keyword to only update the target value when the
when the UI is first constructed. source value changes, not when the binding is first created.
.. code-block:: .. code-block::
@ -175,7 +175,7 @@ when the UI is first constructed.
} }
Gtk.ProgressBar bar2 { Gtk.ProgressBar bar2 {
value: bind bar1.value sync-create; value: bind bar1.value no-sync-create;
} }
Use the ``bidirectional`` keyword to bind properties in both directions. Use the ``bidirectional`` keyword to bind properties in both directions.
@ -200,7 +200,7 @@ to inverted value of another one.
// When switch1 is on, switch2 will be off // When switch1 is on, switch2 will be off
Gtk.Switch switch1 { Gtk.Switch switch1 {
active: bind switch2.active sync-create inverted bidirectional; active: bind switch2.active inverted bidirectional;
} }
// When switch2 is on, switch1 will be off // When switch2 is on, switch1 will be off

View file

@ -24,7 +24,7 @@ Blueprint is a markup language and compiler for GTK 4 user interfaces.
HeaderBar {} HeaderBar {}
Label { Label {
label: bind MyAppWindow.main_text sync-create; label: bind MyAppWindow.main_text;
} }
} }