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 Oct 22, 2014 12:03 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: GtkTreeView Expander Drawing
PostPosted: Mon Feb 11, 2013 7:40 pm 
Offline

Joined: Mon Feb 11, 2013 7:24 pm
Posts: 2
Hello all,

I'm using a GtkTreeView widget and I want to change the appearance of the "expander" icon that opens and closes child rows: I want the icons to be the triangels that we're all familiar with, but they're appearing as boxed "+" and "-" symbols instead.

At first I thought there must be a style enumeration that I can set, but I cannot find one. Then, I thought maybe there's a style property I can set in my theme's gtkrc file, but I don't think there is one. Finally, I resorted to trying to manually override the draw method like so:

Code:
GtkWidget *pTreeView = gtk_tree_view_new_with_model((GtkTreeModel *)pTreeModel);
(GTK_STYLE_GET_CLASS(pTreeView->style))->draw_expander = my_draw_expander_override;

But my_draw_expander_override() never gets called and the expanders are still the boxed "+" and "-" icons.

Does anyone know how can I change the appearance of the GtkTreeView expander icons or just draw them myself?

Thanks a bunch in advance!


Top
 Profile  
 
 Post subject: Re: GtkTreeView Expander Drawing
PostPosted: Tue Feb 12, 2013 2:25 pm 
Offline

Joined: Mon Feb 11, 2013 7:24 pm
Posts: 2
Turns out the answer is to set the draw_expander function after all other tree view widget modifications (setting properties, adding attributes to the column, etc).


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

All times are UTC


Who is online

Users browsing this forum: Google Adsense [Bot] and 2 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