From: Olivier Andrieu MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Message-ID: <17734.20258.334443.362309 at karryall.dnsalias.org> Date: Mon, 30 Oct 2006 20:14:42 +0100 To: "Dmitry Bely" Cc: lablgtk at math.nagoya-u.ac.jp Subject: Re: set_columns method for class GTree.icon_view In-Reply-To: <90823c940610300311u2ce09a90gff5cb873d05603df at mail.gmail.com> References: <90823c940610300311u2ce09a90gff5cb873d05603df at mail.gmail.com> Content-Type: text/plain; charset=us-ascii Content-Length: 1131 Dmitry Bely [Monday 30 October 2006] : > > Gtk has > > gtk_icon_view_set_columns () > Sets the ::columns property which determines in how many columns the > icons are arranged > > Why there is no equivalent in LablGTK? Because. No reason. Sometimes it's because the function/property was added in a later release of GTK+, after the widget was wrapped in LablGTK. > Is it possible to get the same functionality another way? Yes since it's a simple property. It is always possible to use these properties from LablGTK. "Wrapping" a property in LablGTK simply means defining a small record and defining setter/getter methods in the object. Here are functions that should do what you need: ,---- | let columns_property : ([> Gtk.iconview], int) Gobject.property = | { Gobject.name = "columns" ; | Gobject.conv = Gobject.Data.int } | let get_iv iv = | let w = iv#as_widget in | (Gobject.try_cast w "GtkIconView" : Gtk.iconview Gtk.obj) | let set_columns iv = | Gobject.set columns_property (get_iv iv) | let get_columns iv = | Gobject.get columns_property (get_iv iv) `---- (untested) -- Olivier