comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: GtkAda Tree_View properties
Date: Tue, 22 May 2007 15:21:49 +0200
Date: 2007-05-22T15:19:45+02:00	[thread overview]
Message-ID: <16k72uchyd1qc.1jah7jth0g5fz.dlg@40tude.net> (raw)
In-Reply-To: pan.2007.05.22.11.37.02.565004@linuxchip.demon.co.uk.uk.uk

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



  reply	other threads:[~2007-05-22 13:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-22 11:36 GtkAda Tree_View properties Dr. Adrian Wrigley
2007-05-22 13:21 ` Dmitry A. Kazakov [this message]
2007-05-25  0:05   ` Dr. Adrian Wrigley
2007-05-25  8:01     ` Dmitry A. Kazakov
2007-05-25 14:43       ` petter_fryklund
2007-05-25 15:12         ` Dr. Adrian Wrigley
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox