Hello community,
I started learning GTK dev for a week now. some times i get stuck and waste so much time for a simple task due to the lack of examples (especially using builder). So my last problem is trying to set the range of a GtkSpinButton in the docs there is a method to set the range of the widget but i don’t know how to do it from xml. I can get the object and set range using python but i want to do it directly using xml.
My first question is how can i do it.
Second is there a common pattern i should follow with builder like properties are translated to a property tag with name=“the name of the property” and the value. I have tried to create a property <method name="set_range">10.0, 100.0 </method> I’m improvising a bit. same goes for signals each time i find an example with different properties.
To make a range that starts at 1 and goes from 0 - 100.
There is not really a common pattern outside of using <property> and <signal> tags, and then a few extra things for widgets. Those are standard so they should work in most cases. If another widget supports custom elements, the documentation will say what those are in a section describing the GtkBuildable usage.