GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Wed Nov 26, 2014 1:49 pm

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: regarding gtktreeview
PostPosted: Tue Feb 13, 2007 11:02 am 
Offline
GTK+ Geek

Joined: Fri Oct 06, 2006 6:37 am
Posts: 57
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group