problem highlighting



in my app, when a user clicks on a pixmap widget, I want it to appear to
be highlighted.  So I was thinking I would just draw a box around the
widget.

the pixmap widget is placed inside a vbox which is inside
gtkscrolledwindow widget.  to place the rectangle, I do something like
this:

         gdk_draw_rectangle( side_vbox->window /*GdkDrawable *drawable*/,
                        side_vbox->style->bg_gc[GTK_STATE_SELECTED],
                        TRUE,                          /*FILL*/
                        GTK_WIDGET(widg)->allocation.x /*X*/,
                        GTK_WIDGET(widg)->allocation.y /*Y*/,
                        highlighted_tile->surface->w+5 /*width*/,
                        highlighted_tile->surface->h+5 /*height*/ );

the rectangle gets drawn, but when I move the scrollbars, any part of the
rectangle that gets moved off the screen is erased from the window
altogether.

Im thinking that I shouldnt be drawing to the vbox window, but am unsure
what I should draw to.

thanks
angelo





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