Re: [gtk-list] GDK starting



Alexander Kotelnikov wrote:
>        gtk_widget_show (drawing_area);
>        gtk_widget_show (window);

       while(gtk_events_pending()) gtk_main_iteration();
(wait until the window is completely drawn)

>        gdk_draw_rectangle (drawing_area->window,

As you will see, the black rectangle will vanish if you move another
window ontop of yours and away again.

This is because a widget has to be redrawn, whenever it is newly
exposed. There is a event that tells you that the widget has been
exposed: GdkEventExpose

Take a look at the tutorial and/or example scribble_simple. You will get
the idea very soon, i think.

Greetings,
Roland Bock



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