Re: Custom Widget, how to paint standard button backgrounds?
- From: Murray Cumming <murrayc murrayc com>
- To: gafferuk <gafferuk gmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: Custom Widget, how to paint standard button backgrounds?
- Date: Thu, 02 Apr 2009 17:38:28 +0200
On Tue, 2009-03-31 at 21:47 -0700, gafferuk wrote:
> I comes up with the following error; Gdk-CRITICAL **: gdk_draw_drawable:
> assertion `src != NULL' failed
>
> nothing shows up.
>
> any ideas?
Check for null pointers (or Glib::RefPtrs). Use valgrind. Use a
debugger. The usual stuff.
>
> Murray Cumming wrote:
> >
> > On Tue, 2009-03-31 at 01:18 -0700, gafferuk wrote:
> >> i have the following but does not work,
> >
> > What exactly does not work?
> >
> >> any ideas?
> >>
> >> bool MyWidget::on_expose_event(GdkEventExpose *event)
> >> {
> >>
> >> Glib::RefPtr<Gdk::Pixmap> pixmap =
> >> get_style()->get_bg_pixmap(Gtk::STATE_NORMAL);
> >> get_window()->draw_drawable
> >> (
> >> get_style()->get_fg_gc(get_state()),
> >> pixmap,
> >> event->area.x, event->area.y,
> >> event->area.x, event->area.y,
> >> event->area.width, event->area.height
> >> );
> >>
> >> return false;
> >> }
> >>
> > --
> > murrayc murrayc com
> > www.murrayc.com
> > www.openismus.com
> >
> > _______________________________________________
> > gtkmm-list mailing list
> > gtkmm-list gnome org
> > http://mail.gnome.org/mailman/listinfo/gtkmm-list
> >
> >
>
--
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]