Re: GtkBuilder property binding syntax
- From: Emmanuele Bassi <ebassi gmail com>
- To: Phillip Wood <phillip wood dunelm org uk>
- Cc: "gtk-app-devel-list gnome org" <gtk-app-devel-list gnome org>
- Subject: Re: GtkBuilder property binding syntax
- Date: Fri, 20 Jun 2014 17:04:41 +0100
hi;
that's not entirely correct: GtkBuilder now allows binding properties
directly in the XML:
It is also possible to bind a property value to another object's property value using
the attributes "bind-source" to specify the source object of the binding, "bind-property"
to specify the source property and optionally "bind-flags" to specify the binding flags
Internally builder implement this using GBinding objects. For more information see
g_object_bind_property()
but in order to do that, you'll need the current development tree of
GTK+, 3.13. the next stable version of GTK+ that will support binding
properties directly in the XML, 3.14, is going to be release in
August/September.
for the time being, you'll indeed have to use code.
ciao,
Emmanuele.
On 20 June 2014 16:57, Phillip Wood <phil philandanna no-ip org> wrote:
On 20/06/14 16:23, Victor A. Santos wrote:
Which is the syntax for property binding in UI definition files ?
I've tried:
<property name="label" bind-source="cross_low_adj"
bind-property="value" />
but:
<input>:3:3535 'bind-source' is not a valid attribute of <property>
If you want property "label" to have the value "cross_low_adj" then the
syntax is
<property name="label">cross_low_adj</property>
If you want the property to have the value in the variable cross_low_adj
then you can't do that with GtkBuilder, you need to write some code to
assign the property in your program.
Best Wishes
Phillip
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
--
W: http://www.emmanuelebassi.name
B: http://blogs.gnome.org/ebassi/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]