Re: how many attributes in gtk_tree_view_column_new_with_attributes?



On Mon, 2002-11-18 at 00:52, chen.shengqi wrote:
Dear sirs:
    How many attributes can I use in gtk_tree_view_column_new_with_attributes? and what are they? where can 
I get a full descrip about it?
    thanks.

As many as you want/your system can handle, they are sent as pairs of
gchar*-key/int-value, ending with a NULL key (the value is the column in
the model which contains the right value in the right type):

gtk_tree_view_column_new_with_attributes ("Column Title", text_renderer,
"forground", SOME_PLACE_IN_THE_MODEL, "background-gdk",
SOME_OTHER_PLACE, "text", SOME_OTHER_OTHER_PLACE, NULL);

That sets the text color to the gchar* string contents the
SOME_PLACE_IN_THE_MODEL column, the background to the GdkColor* contents
of the SOME_OTHER_PLACE column, and the actual test to display to the
gchar* string contents of the SOME_OTHER_OTHER_PLACE column.

See: http://developer.gnome.org/doc/API/2.0/gtk/GtkTreeViewColumn.html

Peace,

    Jim Cape
    http://ignore-your.tv

    "Solidarity, mutual aid, collective liberation, autonomy,
     empowerment, anti-hierarchy, anti-oppression, diversity,
     creativity--these are the social values I think of when
     I hear the word anarchy."
        -- http://www.infoshop.org/rants/solstice_reflections.html




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]