Re: GtkFrame adaption



  

--- Forwarded Message ---
 From: tam <tam tam mytale tam>
 To: Carsten Burstedde <bursted iam uni-bonn de>
 Sent: Tue, 13 Nov 2001 12:43:46 +0100
 Subject: Re: GtkFrame adaption


On Mon, 22 Oct 2001 16:10:26 +0200, Carsten Burstedde said:

> Hi,
>  
>  I modified the gtkframe widget to do the following:
>  
>  /-----------  frame.allocation -----------\
>  |
>  |          empty space
>  |
>  |          /---- frame shadow/line ----\
>  |          |      child widget
>  |          |
>  |
>  
>  so that the child widget may change size and is always directly bounded
>  by the frame shadow line and centered inside the frame allocation space.
>  
>  This works fine until the child widget changes in size: On increase, the
>  frame is not told to redraw itself, so the frame shadow can't be drawn
>  to fit around the (now bigger) child; the old shadow is overdrawn by the
>  child (in my case a drawing area, resized by gtk_drawing_area_size). So
>  it is missing. If the widget decreases in size, there is again no call
>  to the frame drawing routines, so the old (too big) shadow stays there
>  and cannot be overdrawn (I put the necessary background drawing stuff
>  inside the frame drawing routine).
>  
>  Normal exposes work, then the shadow appears/disappears as appropriate.
>  
>  What can I do? Do I have to set up some virtual function (maybe for
>  gtkcontainer)?
>  
>  Thanks,
>  
>  Carsten
>  
>  _______________________________________________
>  gtk-list mailing list
>  gtk-list gnome org
>  http://mail.gnome.org/mailman/listinfo/gtk-list
>  

Maybe try something like:

gtk_drawing_area_size(GTK_DRAWING_AREA(child), width, height);
gtk_widget_set_usize(GTK_WIDGET(frame), width, height);

Tam




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