Re: New member to list - Make a window non-resizable



On 3/28/07, Joaquim Duran <joaquinduran adtelecom es> wrote:
Dear all,

My name is Joaquim Duran. I'm a computer programmer from AD Telecom
(www.adtelecom.es). Currently I'm developing an embedded system using Gtkmm.

I'm interested to show a window (GTK::Window) of fixed size (480 x 800)
while moving some pictures in the window. Some time, the images should
be clipped because part of them should be dawn outside of the window
limits, but the behavior of gtkmm is resize the window to show all picture.

In the constructor of main window I've included the following line:

resize(480, 800);
set_resizable(false);
property_allow_grow () = false;
property_allow_shrink () = false;

however they haven't provided the behavior that I was interested.
Is there any way to force a window to be fixed size?


Thanks and Best Regards,
Joaquim Duran

Gtk::Widget::set_size_request() [1] might do what you want to do.
Another possibility might be to wrap everything in a ScrolledWindow so
that when the content becomes bigger than 480x800, you just get
scrollbars instead of causing the window to resize.

[1] http://gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1Widget.html#5e95431f630a226b0b7297e4815ee945
--
jonner



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