Message-ID: <4461A1A1.30508 at laposte.net> Date: Wed, 10 May 2006 10:17:37 +0200 From: Matthieu Dubuget Reply-To: matthieu.dubuget at laposte.net MIME-Version: 1.0 To: lablgtk at math.nagoya-u.ac.jp Subject: GTree.view: use of attributes Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1 Content-Length: 1098 Hello, I'm trying to display datas using GTree. I would like to be able to adapt every row, depending on some values stored in different columns of the model. I achieved this using the set_cell_data_func method of view_column. Is there something more direct, to achieve the same effect? I tried to use: val view_column : ?title:string -> ?renderer:(#cell_renderer * (string * 'a column) list) -> unit -> view_column but it does not work if the columns I try to connect to the renderer properties are heterogeneous: for example, I was not able to connect the `FOREGROUND_SET property to one column, and in the same time, the `TEXT property to another, because the types of the two columns differs. Inside view_column class, there is method add_attribute : 'a 'b. (#cell_renderer as 'a) -> string -> 'b column -> unit = fun crr attr col -> TreeViewColumn.add_attribute obj crr#as_renderer attr col.index that (if I understand well) should help to do what I need? Is there any good reason not to export this function in gTree.mli? Thanks in advance Matthieu Dubuget