Re: GtkFrame adaption again



> > What can I do? Do I have to set up some virtual function (maybe for
> > gtkcontainer)?
>
> Try:
>
>  gtk_container_set_reallocate_redraws (GTK_CONTAINER (my_widget), TRUE);
>
> In your init function. The other thing you could do is call
> gtk_widget_queue_draw() in your size_allocate() method directly.
>
> Unless told otherwise, GTK+ doesn't redraw a container widget
> if it's child widgets change allocation but the container itself
> doesn't; this is because the most common containers (e.g., boxes,
> tables, etc) don't draw anything themselves, so redrawing the
> container's area every time the children change would be a waste.

This works great (reallocate_redraws)! I missed this function when I looked
through gtkcontainer.c. I was so close :( .
Now what's still to do is some clipping code so I don't draw my background
rectangle over the child area without reason.

Thanks, am happy now,

Carsten




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