Re: [gtk-list] Re: Trying to draw in a window



Tim Janik <timj@gtk.org> writes:

> 
> by gtk, part of a toolkits responsiveness is to redraw exposed regions which
> for normal windows will just 'clear' the background. if you want to draw
> you own things in such a window, you need to inform gtk about that with the
> gtk_widget_set_app_paintable () function.

Thanks a lot; I didn't know this function;

> rather than using global variables here, i'd suggest you use something like
> 
> gdk_draw_line (widget->window,
>                widget->style->fg_gc[GTK_STATE_NORMAL],
>                10, 20,
>                100, 20);

yes; this code was just an example for the rpoblem I had;

Thanks again

Hubert



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