Re: fixed widget sizes



On Wed, 2008-05-28 at 12:53 +0200, jody wrote:
> Hi
> 
> I want to make an application which displays an image.
> I want the window to have a fixed size, and use
> scrollbars to scroll through the image if it is too large.
> 
> But when i add a Gtk::Image to a widget, it (and the enclosing containers)
> always grow to the size of the image.
> How can i tell a widget (e.g. the Gtk::Image) not to change its size?
> How can i in general set the size a window or a widget should have at startup?

Window::set_default_size() might be what you want. The documentation for
that method has some other suggestions:
http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1Window.html#c7bddf34f109fd2ed006ff95f1ae881c

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com



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