Re: Resizing drawing area immediately




George <jirka@5z.com> writes:

> On Wed, Sep 16, 1998 at 01:22:32PM -0400, Conrad Steenberg wrote:
> > I hope someone can help me on this:
> > 
> > I have a drawing area widget inside a scrolled window widget. If The main
> > window (or widget) containing the scrolled window is resized, the drawing
> > area widget also gets resized.
> > 
> > Does anyone know how to prevent this resizing, or more accurately,
> > override the size parameters widget->allocation.[width,height]? 
> > 
> > I currently have a signal handler connected to the configure event of the
> > drawing area where the size of widget is changed by gtk_drawing_area_size.
> > But this does not work immediately, only after the widget is redrawn. 
> 
> derive a widget from drawing area .. and override the size_request
> size_allocate methods 

Perhaps considerably easier - 

 * Set the desired size for the drawing area with 
   gtk_drawing_area_size()

 * Put the drawing area inside an alignment with xscale and
   yscale equal to 0 so that size will always be honored.

Regards,
                                        Owen



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