Hi
I started using Julia to build a form generator by GTK and I haven’t find a list of widget properties so, for example, for set the button width. I have tried this:
function createButton(caption,width)
btn = GtkButton(caption)
set_gtk_property!(btn, :width,width)
return btn
end
...
ok = createButton("Ok",70)
obtaining this warnig:
g_object_set_is_valid_property: object class 'GtkButton' has no property named 'width'
Thanks
Unfortunately, the documentation is very sparse. I scoured the unit tests and source code, and also cross referenced the GTK documentation here.
Thanks
I hadn’t seen this documentation yet.
On first examination it would seem (perhaps) that the solution is CSS. I try to investigate this.
Hello
I was able to set some button properties (text color, border), but not width:
function createButton(name,caption,width)
btn = GtkButton(caption)
sc = GAccessor.style_context(btn)
pr = CssProviderLeaf(data="#$name {background:olive;border-width:10px}")
push!(sc, StyleProvider(pr), 600)
set_gtk_property!(btn, :name, caption)
return btn