Prb with gdk_draw_rectangle when used with GtkStyle.
- From: "Saravanan A" <saru_sw rediffmail com>
- To: gtk-list gnome org <gtk-list gnome org>
- Subject: Prb with gdk_draw_rectangle when used with GtkStyle.
- Date: 9 Jan 2001 07:13:19 -0000
Hi List,
I have a problem with gdk_draw_rectangle when GtkStyle is set to the widget.
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.
I don't understand the exact funtionality of gdk_gc_set_subwindow, can someone please help me.
With Regards,
Saravanan A.
India.
_____________________________________________________
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]