scrolledWindow.SetPolicy(PolicyType.Always, PolicyType.Never);
scrolledWindow.SetPolicy(PolicyType.Automatic, PolicyType.Automatic);This means that the ScrolledWindow will only enable scrolling if the contents exceed the available space in either direction. These examples were written using the Gtk package library.