how to add button inside the treview list
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
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 prasadamku...@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 ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: how to add button inside the treview list
Hi Viven, As you suggested i have tried with the GtkCellRendererText, using this i am able to paint the button box into the cell but i am unable to put the text on top of the painted button, please some body help me out how to render the text on the button. Please find the code in attachment. Thanks to responding to my mail. --PPK On Tue, Dec 16, 2008 at 2:54 PM, Vivien Malerba vmale...@gmail.com wrote: 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 prasadamku...@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 ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list