From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,84fadb10359fe385 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!gegeweb.org!usenet-fr.net!proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: GtkAda Tree_View properties Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: Date: Tue, 22 May 2007 15:21:49 +0200 Message-ID: <16k72uchyd1qc.1jah7jth0g5fz.dlg@40tude.net> NNTP-Posting-Date: 22 May 2007 15:19:45 CEST NNTP-Posting-Host: 2ed30930.newsspool4.arcor-online.net X-Trace: DXC=1OjdH5kJ1MM@Y=h<_c3PkH4IUKkgB9CK[>LZCn?D X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:15879 Date: 2007-05-22T15:19:45+02:00 List-Id: 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 ::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