Re: GtkAda Tree_View properties



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
.



Relevant Pages

  • Re: Damn you, FEDEX! or Nikon D40 lost in Springfield, MO blackhole.
    ... the 2 mp Mavica he had been using with a Nikon D40. ... After shopping around, he got me to order one for him. ... The shipper had it insured, but from what I have read it could take weeks to sort this crap out. ... You may get your insurance from FedEx and a couple weeks later they find it and deliver it. ...
    (alt.photography)
  • Re: A Cars velocity
    ... If by instantaneously you mean Zero, infinite acceleration is required ... How much money do you have for the speedometer design phase? ...
    (sci.physics)
  • Re: The Sci-Fi Rejection Letter That Time Forgot
    ... nations have stockpiled arsenals of these incredible bombs and the time the story is set. ...
    (rec.arts.sf.written)
  • RE: copied music cds have a skip in last 18 seconds
    ... If installing all missing Windows Updates doesn't fix your problem ... xiowan.......in tucson ...
    (microsoft.public.windows.mediacenter)