コード例 #1
0
    static public void Merge(this SplitContainer currentsplitter, int panel)                    // currentsplitter has a splitter underneath it in panel (0/1)
    {
        SplitContainer tomerge = currentsplitter.Controls[panel].Controls[0] as SplitContainer; // verified by enable on open

        Control keep = tomerge.Controls[0].Controls[0];                                         // we keep this tree..

        tomerge.Controls[0].Controls.Clear();                                                   // clear control list - we want to keep these..
        tomerge.DisposeTree(0);                                                                 // tree dispose of all other stuff left, and dispose of tomerge.

        currentsplitter.Controls[panel].Controls.Add(keep);
    }