Howto: Change colours for canvas items?



Hi,
I'm (attempting) to write a file manager using gnome/gtk, and are using 
a canvas to draw the file details on. However, I wish to be able to 
change the color of text items later, when they are "highlighted".

I've looked through the documentation and source and reckon that the 
following should have done it:

gtk_object_set_data(GTK_OBJECT(item),"fill_color", "green");

and/or:

gdkc=g_malloc(sizeof(GdkColor));
gnome_canvas_get_color(gc,"green",gdkc);
gtk_object_set_data(GTK_OBJECT(item), "fill_color_gdk", gdkc);

However, neither appears to work...

Any help gratefully received!!

Regards,

Simon Edwards  



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