GtkWindow::set_policy

GtkWindow::set_policy

The default policy on a GtkWindow is false, true, false, which retains the default size of the window on opening and allows the user to resize it thereafter.

allow_shrink when set to true allows the window to be smaller than its child's size requisition, which has the effect of truncating the child. For this reason, it should always be set to false.

allow_grow when set to true allows the window to be expanded beyond its initial size. The default behaviour of the child is to expand with the window, in most cases. Setting the allow_grow parameter to false prevents such resizing, taking the requisition size of the window's child as the window's base size.

auto_shrink when set to true overrides the window's default size setting, and shrinks or expands the window to fit the child's requisition size if the second parameter hasn't already done so.

Basically the only reason to use this method is likely to be when you don't want the window to be user-resizable. In this case, the setting you should use is false, false, true, or alternatively false, false, false which will have the same effect due to the redundancy of the third parameter here.

This method has been deprecated in GTK 2.0 in favour of a new and more efficient method. It would be wise to bear this in mind and use set_policy() sparingly.

© Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.