Re: Trying hard with a custom cellrenderer.
- From: Germán Diago <germandiago gmail com>
- To: gtkmm-list gnome org
- Subject: Re: Trying hard with a custom cellrenderer.
- Date: Thu, 1 Jul 2010 12:44:36 +0200
I'm trying to render the button with this approach, but I've had no
luck. In the render_vfunc in my cellrenderer. My cellrenderer
derives from Gtk::CellRendererPixbuf. But the text for the button is
not displayed and the button looks like something gray as if
it weren't a real Gtk::Button.
void render_vfunc(Glib::RefPtr<Gdk::Drawable> const & window,
Gtk::Widget& widget,
Gdk::Rectangle const & background_area,
Gdk::Rectangle const & cell_area,
Gdk::Rectangle const & expose_area,
Gtk::CellRendererState flags) {
OffscreenWindow osw;
Gtk::Button b(property_url_);
osw.add(b);
osw.show_all();
auto pixbuf = osw.get_pixbuf();
property_pixbuf() = pixbuf;
CellRendererPixbuf::render_vfunc(window, widget,
background_area, cell_area, expose_area, flags);
}
I couldn't use a Gtk::TreeModelColumn<URL*> in any way. I had to use
Gtk::TreeModelColumn<Glib::ustring> but that's not
what I want.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]