restraining the size of a widget




I have a drawing area which I don't want the user to be able to make
bigger than the pixmap contained within it. The drawing area is
currently packed into a scrolled window.

When the user resizes the top-level window such that the drawing area
becomes bigger than the pixmap things start to look ugly.

I know how to restrain the size of a top-level window, but the window
also contains a menubar and a statusbar, so I can't just restrain it
to the size of the pixmap.

Ideally I would like to:

gdk_window_set_policy(GDK_WINDOW (drawing_area->window), TRUE, FALSE,
                                                TRUE);
gtk_drawing_area_size ( GTK_DRAWING_AREA(drawing_area), pixmap_width,
                                                pixmap_height);

but the first function doesn't exist (note the GDK, not GTK) :-(

--
E-Mail: Tony Gale <gale@daedalus.dera.gov.uk>
I think your opinions are reasonable, except for the one about my
mental
instability.
                -- Psychology Professor, Farifield University

The views expressed above are entirely those of the writer
and do not represent the views, policy or understanding of
any other person or official body.



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