Hello.

I have a big Gtk.Layout and I want to put it inside a ScrolledWindow
in order to use scroll bars. It's supposed that Gtk.Layout has native
scrolling capabilities, so I can use the Add method instead of
AddWithViewport. For some reason this is not working right. When I use
Add, my window get expanded to the size of the Layout, which is the
opposite of what I want. Here is a sample code:

public class MainClass {
        public static void Main () {
                Application.Init ();
                
                Window win = new Window ("Layout test");
                ScrolledWindow scroll = new ScrolledWindow (null, null);
                scroll.SetPolicy(PolicyType.Always, PolicyType.Always);
                win.Add (scroll);
                
                Layout layout = new Layout (null, null);
                layout.SetSizeRequest(1000, 1000);
                scroll.Add(layout);
                
                win.ShowAll();
                Application.Run ();
        }
}

I want my window to remain small while the scrollbars can be used to
navigate thought the layout.

Thanks in advance.

Manuel Cerón.
_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to