Gtk.Paned Class
Base class for containers that have two children separated by an adjustable pane.

See Also: Paned Members


public class Paned : Container


This class provides methods for manipulating a panel with 2 child widgets, separated by a splitter. The concrete widgets that extend from this class are Gtk.VPaned for a vertical splitter, and Gtk.HPaned for a horizontal splitter.

A paned widget draws a separator between the two child widgets that the user can drag to adjust the division.

Each child widget has two options that can be set, resize and shrink, (set with the Paned.Pack1 and Paned.Pack2 methods). If resize is true, then when the Paned is resized, the respective child will expand or shrink along with the paned widget. If shrink is true, then the respective child can be made smaller than it's requisition by the user. Setting shrink to false allows the application to set a minimum size. If resize is false for both children, then this exhibits exactly the same behaviour as if resize is true for both children.

The application can set the position of the slider as if it were set by the user with the Paned.Position property.

C# Example

public Widget GetExampleFrame()
    HPaned splitter = new HPaned();
    Frame frame1 = new Frame("Example frame1");
    Frame frame2 = new Frame("Example frame2");

    splitter.Pack1(frame1, true, false);
    splitter.Pack2(frame2, false, false);
    return splitter;


Namespace: Gtk
Assembly: gtk-sharp (in gtk-sharp.dll)
Assembly Versions: