Re: Packing & Selecting Icons/Buttons in a TreeView column



If you know the width of the pixmap that is embedded in the column, you
might try using gtk_tree_view_widget_to_tree_coords() in your model
selection changed callback function to determine whether or not the
mouse cursor falls within the area (width wise) occupied by the pixmap. 
This suggestion may be naive, since I've never tried it.

Best regards,
Bob Caryl

On Tue, 2005-01-11 at 16:10, Gorshkov wrote:
I have an application where I want to place an icon at the start of a column, 
followed by text, in a TreeView.

Because of the way the treeview seems to handle indents, I'm trying to pack a 
pixmap and then the text into a single column using multpile cell renderers - 
THAT part is working fine.

The problem I'm having is this ..... when I click on the column, everything 
gets selected ok, and the the world is as it should be. But if the click is 
over the icon, I want to be able to invoke some code to "do stuff", instead 
of just select the row.

I can't seem to find any way to do that outside of writing my own custom cell 
renderer to impliment a pixmap-type button - any suggestions?
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




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