Finally I did it listening the expose-event and drawing everithing with cairo.
As soon as I finish it this is going to be in anjuta.
Regards.
On Sat, May 10, 2008 at 9:48 PM, Dov Grobgeld <dov.grobgeld@xxxxxxxxx> wrote:
Note that a VBox doesn't get any expose events as it doesn't have any "drawable area" (I forgot the proper name for its classifaction). To get expose events pack the vbox into a GtkEventBox. You can then set the background of the GtkEventBox.
Regards,
Dov2008/5/10 Donny Viszneki <donny.viszneki@xxxxxxxxx>:I'm not *entirely* sure, but maybe the solution is to make sure that
after your expose-event handler gets called, the default expose event
handler gets called. If my guess is correct, then your expose-event
handler is either being called *after* or *in place of* the ordinary
expose-event handler which draws its child widgets.
Perhaps then another solution might also be to invoke similar
expose-events upon the child nodes of your VBox?
2008/5/5 Nacho <nacho.resa@xxxxxxxxx>:
> Hi,
>
> Anybody knows how to set an image as background in a GtkBox?
>
> I tried it overriding the expose-event doing something like this:
>
> static gboolean
> on_expose_event_cb (GtranslatorWellcomePanel *panel,
> GdkEventExpose *event,
> gpointer useless)
> {
> GdkPixbuf *pixbuf;
> GtkStyle *style = gtk_widget_get_style (GTK_WIDGET (panel));
>
> pixbuf = gdk_pixbuf_scale_simple (panel->priv->bg,
> GTK_WIDGET (panel)->allocation.width,
> gdk_pixbuf_get_height (panel->priv->bg),
> GDK_INTERP_NEAREST);
>
> gdk_draw_pixbuf (event->window,
> style->bg_gc[0], pixbuf, 0, 0, 0, 0, gdk_pixbuf_get_width
> (pixbuf),
> gdk_pixbuf_get_height (pixbuf), GDK_RGB_DITHER_NORMAL, 0, 0);
>
>
> return TRUE;
> }
>
> But the i have the problem that other widgets are not showed.
>
> Regards.
>
> _______________________________________________--
> gtk-list mailing list
> gtk-list@xxxxxxxxx
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
>
http://www.socsurveys.org/
http://blogger.socsurveys.org/
http://del.icio.us/hdon
http://hdon.soup.io/
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list
_______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list