Re: CellRenderer



On Wed, 2008-05-07 at 16:50 +0530, Surya Kiran Gullapalli wrote:
> Hello all,
> 
> I've couple of problems. One is simple to explain, I need to display a
> button in Gtk::TreeView (essentially I need to have some thing like
> cellrendererbutton). What is the best way to go about it.

GtkCellRenderer apparently doesn't offer enough signals to simulate the
full behaviour of a real button, such as roll-over highlighting, but you
can respond to a click on text or an image.

For instance, this is how I made a clickable image cell renderer:
http://svn.gnome.org/viewvc/glom/trunk/glom/utility_widgets/db_adddel/cellrenderer_buttonimage.h?revision=1156&view=markup
http://svn.gnome.org/viewvc/glom/trunk/glom/utility_widgets/db_adddel/cellrenderer_buttonimage.cc?view=markup

There's a clickable text cellrenderer there too:
http://svn.gnome.org/viewvc/glom/trunk/glom/utility_widgets/db_adddel/

Ignore the complicated stuff in "ifndef GLIBMM_VFUNCS_ENABLED".

-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com



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