Re: GtkAda Tree_View properties
- From: "Dmitry A. Kazakov" <mailbox@xxxxxxxxxxxxxxxxx>
- Date: Tue, 22 May 2007 15:21:49 +0200
On Tue, 22 May 2007 11:36:38 GMT, Dr. Adrian Wrigley wrote:
Using GtkAda, I was to set properties for a Gtk_Tree_View.
The lines in the widget have rather excessive vertical spacing.
I think if I set "ypad" and/or "vertical-separator" properties,
I could reduce the spacing. (this seems to be a perennial problem
with gtk programs now. I though I had solved it, but it became unsolved)
Can't I set the properties in a gtkrc file? (this had no effect)
Yes/No.
No, because in GTK there are properties and style properties which are
unrelated [bad design]. The style properties are controlled by RC files.
The object's properties are in free flight. Surely a given widget
implementation might derive some of its properties from style properties,
but this is up to the widget. When you browse the GTKAda documentation:
http://www.adacore.com/wp-content/files/auto_update/gtkada-docs/gtkada_rm/gtkada_rm/gtk-tree_view.html
it lists properties and style properties separately. [click properties tab]
Note that likely the documentation does not list all style properties. If
you want to know all of them you should look into GTK+ sources.
Alternatively you can capture style properties of a widget using Put_Styles
from GtkAda contributions:
http://www.dmitry-kazakov.de/ada/gtkada_contributions.htm#4.5
Specifically for the tree view, my quick check shows the following style
property:
# Vertical space between cells. Must be an even number
# gint range 0 .. 2147483647 Default is 2
<class-name>::vertical-separator = 2
Set_Property (Tree, "ypad", 0); -- This does not compile
This does not compile because the procedure Set_Property has the second
parameter of a non-string type. There is one "property name" type for each
type of the property values. I cannot tell for the merits of this design,
anyway, just use the function Build to convert string to "property name":
Set_Property (Tree, Build ("ypad"), 0); -- This will compile
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
.
- Follow-Ups:
- Re: GtkAda Tree_View properties
- From: Dr. Adrian Wrigley
- Re: GtkAda Tree_View properties
- References:
- GtkAda Tree_View properties
- From: Dr. Adrian Wrigley
- GtkAda Tree_View properties
- Prev by Date: Re: When will 2007 standard be available in gcc-ada?
- Next by Date: Re: When will 2007 standard be available in gcc-ada?
- Previous by thread: GtkAda Tree_View properties
- Next by thread: Re: GtkAda Tree_View properties
- Index(es):
Relevant Pages
|