Has anyone got any inspired ideas how to make the text in a GtkCellRendererText selectable so the user can copy it? I’m trying to fix fd#19252 and it’s not obvious how you do this with GTK. Thanks.

Published by


Richard has over 10 years of experience developing open source software. He is the maintainer of GNOME Software, PackageKit, GNOME Packagekit, GNOME Power Manager, GNOME Color Manager, colord, and UPower and also contributes to many other projects and opensource standards. Richard has three main areas of interest on the free desktop, color management, package management, and power management. Richard graduated a few years ago from the University of Surrey with a Masters in Electronics Engineering. He now works for Red Hat in the desktop group, and also manages a company selling open source calibration equipment. Richard's outside interests include taking photos and eating good food.

4 thoughts on “GtkCellRendererText”

  1. I can tell you that it’s not possible afaik. Someone should probably complain about it loudly in the gtk bugtracker.
    I want to be able to copy/paste a whole tree view, too…

  2. Use probably need to override an existing class and give it some more functionality. GtkLabel is a nice sample to steal code when it comes to text. It features both text selection and the possibility to make hyper-links. Once I needed to be able to make gtklabel act as an button and stole to hyper-links code and reused it, see pastebin reference bellow :-p

  3. Try making your cell renderer editable, and
    in start-editing set the actual entry widget that
    pops up not editable (so you can still select the
    entry), editing-canceled should be fired normally
    when the focus leaves the cell.

Comments are closed.