|
iam using the follwing code
to make the text into color text in gtktreeview
cs = gtk_color_selection_dialog_new (_("Globe7 Select color"));
gtk_window_set_modal(GTK_WINDOW(cs), TRUE);
gtk_window_set_transient_for(GTK_WINDOW(cs), GTK_WINDOW(Globe7));
gtk_window_set_position(GTK_WINDOW(cs), GTK_WIN_POS_CENTER);
gtk_window_set_resizable (GTK_WINDOW (cs), FALSE);
colorsel = (GtkColorSelection *) ((GtkColorSelectionDialog *)cs)->colorsel;
//gtk_color_selection_set_previous_color (colorsel, &ccolor);
// gtk_color_selection_set_current_color (colorsel, &ccolor);
gtk_color_selection_set_has_palette (colorsel, FALSE);
gtk_widget_show(cs);
cw->response = gtk_dialog_run (GTK_DIALOG (cs));
if (cw->response == GTK_RESPONSE_OK )
{
gtk_color_selection_get_current_colorcolorsel, &ccolor);
color_cc=gtk_color_selection_palette_to_string(&ccolor,1);
gtk_text_buffer_create_tag(buffer1,color_cc,"foreground",color_cc,NULL);
gtk_widget_modify_text (textview1, GTK_STATE_NORMAL,&ccolor);
gtk_widget_hide(cs);
}
###########################
but my text color is not changing
i think gtk_widget_modify_text is not working
|