Gdk.color GTree.column ?
Sebastien Ferre <[email protected]>
| Newsgroups | gmane.comp.lang.ocaml.lib.gtk |
|---|---|
| Organization | IRISA |
| Message-ID | <[email protected]> |
Hi,
is it possible to have tree columns
containing GDK colors, as this is possible
with basic types (int, string, ...) and general
Caml values (caml) ?
I'd like to write something like :
let cols = new GTree.column_list in
let text = cols#add string in
let count = cols#add int in
>> let bg_color : Gdk.color GTree.column = cols#add ???
...
let model = GTree.tree_store cols in
let view = GTree.view ~model:model () in
let cell_text = GTree.cell_renderer_text [] in
let col_text =
let col =
GTree.view_column ~title:"Text" ()
~renderer:(cell_count, ["text",count]) in
>> col # add_attribute cell_text "background-gdk" bg_color;
col in
...
What would you put in place of ??? ?
If I put 'caml', then I can put GDK colors in the model,
but column view 'col_text' can read them because they are
seen as 'caml' values instead of GDK colors.
---
Sébastien