Re: increase cell height in a GtkTreeView

(Apologies for such a late reply, I hope it is still of use).

On Fri, Aug 1, 2008 at 11:37 AM, Nicolas Soubeiran
<nicolas soubeiran gmail com> wrote:
Hi all,
I need to create a treeview with a column which displays a pixbuf that
becomes bigger when the user hovers the row. So I create a cellrenderer
which display either the big pixbuf either the small pixbuf depending of the
value of the GtkCellRendererState flag (if PRELIT then display big pixbuf,
else small). It works except that the height of the cell is always the same
so when the big pixbuf should be displayed, it is troncated.

Once a row got its size calculated and allocated, it will not change
unless the data in the model changes (signaled via row-changed).  When
GtkTreeView receives row-changed for a row, it will recalculate the
requested height for that row by re-querying the cell renderers.
Apart from this, cell renderers cannot influence the height of the

I want to know how to ask the cell to request more space. Currently I've
copy/paste the render and get_size fonction of gtk_cell_renderer_pixbuf in
my component.

The easiest solution is to emit the row-changed signal (using
gtk_tree_model_row_changed()) once the row has to update its height.



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