Re: Gtk::DrawingArea and libglademm





My problem was that on_expose_event(...) was not called automatically for the environment when to redraw was needed, now I have created manually the Gtk::DrawingArea (not referencing with libglademm) and the class that inherits from Gtk::DrawingArea (MyDrawingArea) calls on_expose_event(...) automatically. Now I call also widget->queue_draw() when I want to change manually the Draw and redraw it. Your help had been so useful for me, thanks Alex.

2006/8/30, Alexander Gehlert <alexander gehlert raritan com>:
Hi,
> * My Gtk::DrawingArea is created with Glade and it's referenced with
> refXml->get_widget(). I don't know how to do that my class be a
> subclass of the DrawingArea that I've created with Glade and the
> widget call the on_expose_event(GdkEventExpose *event) to redraw every
> time is needed.
>
I'm not sure if you know, you can't call on_expose_event(GdkEventExpose
*event) directly, instead you have to call widget->queue_draw() or
queue_draw_area(...). Then the mainloop add your repaint request to the
scheduler and the callback on_expose_event gets called ... hope that helps

regards!

Alex

--
Alexander Gehlert - Intern
reply to : alexander gehlert raritan com

Raritan Zwickau
Software Development
Scheringerstrasse 1
08056 Zwickau
Germany






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