Problem with gdk_draw_rectangle when used with GtkStyle



Hello list,

   I have a problem with gdk_draw_rectangle when GtkStyle is set to the widget (I have posted this earlier, I 
am posting it again, hoping for better response. Thanks in advance)

   I tried drawing boundary to a label widget contained on an event box (GtkEventBox) which in turn is 
contained on a fixed Widget, using the following code (Here SelWid is a label widget).

   black_gc = SelWid->style->black_gc;
   gdk_gc_set_subwindow (black_gc, GDK_INCLUDE_INFERIORS);
   gdk_draw_rectangle (SelWid->parent->parent->window,
                       SelWid->style->black_gc, FALSE,
                       SelWid->parent->allocation.x,
                       SelWid->parent->allocation.y,
                       SelWid->parent->allocation.width,
                       SelWid->parent->allocation.height);
   gdk_gc_set_subwindow (black_gc, GDK_CLIP_BY_CHILDREN);

   This is working fine. But if I try setting the style of the label widget using the following code, the 
above one is not working as desire.

   GStyle = gtk_style_copy(SelWid->style);
   GStyle->font = GFont;
   gtk_widget_set_style (SelWid, GStyle);

   Can some one help me sorting this problem. Thanks in advance.

With Regards,
Saravanan A.

_____________________________________________________
Chat with your friends as soon as they come online. Get Rediff Bol at
http://bol.rediff.com








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