Re: how to add button inside the treview list



AFAIK, you can't display a button in a treeview column (no GtkCellRenderer
exist for this). Also having buttons for each row would make the treeview
not as much useable as it is now because each button would consume
ressources (memory and X ressources), and it is not how GtkCellRenders are
designed (they mainly only paint contents).

You'll have to write your own GtkCellRenderer to make it display whatever
you want and maybe the best is that the cell renderer display a button when
it is being edited (have a look at the GtkCellRendererText which adopts this
approach).

Vivien

2008/12/16 prasadam kumar <prasadamkumar gmail com>

Hi,

I am unable to find the way to add the button inside the treeview using GTK
'C' bindings.
I am able to insert pixbuf,togglebuttons,processbar inside the treeview,
but
according to my requirement i have to put Button inside the treeview. I
have
not found any API  related to button with treeview.

My requirement is:
1. I need three columns.
2. First column should be string so i can display the strings, rest of two
columns I want to display buttons.

Please some one help out how to solve this and feel free to giving the
suggestions.

Thanks in advance.

Regards
PPK
_______________________________________________
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]