Re: Custom CellRendererText doesn't update cell size

Do you really have to override snapshot_vfunc() and call it explicitly? Isn't gtk's internal version good enough and called when you set property_text()? The CellrendererText will expand as necessary only if it's inserted in a container widget that allows it to expand.

On 2021-09-09 13:15, pedro vicente oncontrol-tech com wrote:
I'm trying to do a Cell Renderer that converts a std::deque into a string.
So I derivated the CellRendererText and override the snapshot_vfunc.
First I converted the deque to string, updated the property_text and called Gtk::CellRendererText::snapshot_vfunc to render the text. On gtkmm3 it was working as intended, but on gtkmm4 it doesn't update the size of the cell and so the string in only partially shown.

Pedro Serrano

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