Re: CellRenderer size



On 8/31/07, Roger Ferrer Ibáñez <rofi ya com> wrote:
> Hi,
>
> I'm writing a CellRenderer and it is unclear to me how the CellRenderer
> tells the related TreeView the size it will require when drawing.
>
> I've seen that there is CellRenderer::set_fixed_size but I don't know if
> this is the proper way to achieve this.
>
> Thank you,

basically you need to override get_size_vfunc() [1], to return the
size that you want the cellrenderer to be.  This function is called by
the treeview (at least indirectly) to see how much size to allocate
for the cell.

[1] http://gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1CellRenderer.html#77c6f5b4b422a00b01c5b6945676f3f4
-- 
jonner



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