slightly complex help with the splitcontainer needed! plz
-
HI , i'm trying to make a simple version of VS's collapsible pannels. I know there are collapsible panels in the articles section but i want to keep it simple. I use the [Panel] control , i can have it hide and show with the user clicking or hovering over a long flat(looks better) button.But i still dont have one important functionality. The pin feature. In VS , if i click the pin/auto hide button the controls in the panel show up on a SplitContainer panel: http://gidsfiles.googlepages.com/splitcontainer.jpg[^] Even outlook 2007 and probably older versions have this feature: http://gidsfiles.googlepages.com/outlook_expand_todo.jpg[^] If i click that button , the collapsible panel is no more collapsible and is now in a splitcontainer panel. http://gidsfiles.googlepages.com/outlook_expand_splitview.jpg[^] Continuing with my panel concept,i have a litte pin button , i tried removing the Panel from the Form.Controls collection and adding it into splitcontainer.Controls when it is clicked. Like this: Code:
private void btnPin_Click(object sender, EventArgs e) { if (splitContainer1.Panel2Collapsed) { splitContainer1.Panel2Collapsed = false; this.Controls.Remove(panel1); splitContainer1.Panel2.Controls.Add(panel1); panel1.Visible = true; } else { splitContainer1.Panel2Collapsed = true; splitContainer1.Panel2.Controls.Remove(panel1); this.Controls.Add(panel1); panel1.Location = new Point(12, 277); panel1.Visible = true; } }
Yes , it does not work at all , the panel never shows in the split container. Could someone please help out? Thanks so much Gideon -
HI , i'm trying to make a simple version of VS's collapsible pannels. I know there are collapsible panels in the articles section but i want to keep it simple. I use the [Panel] control , i can have it hide and show with the user clicking or hovering over a long flat(looks better) button.But i still dont have one important functionality. The pin feature. In VS , if i click the pin/auto hide button the controls in the panel show up on a SplitContainer panel: http://gidsfiles.googlepages.com/splitcontainer.jpg[^] Even outlook 2007 and probably older versions have this feature: http://gidsfiles.googlepages.com/outlook_expand_todo.jpg[^] If i click that button , the collapsible panel is no more collapsible and is now in a splitcontainer panel. http://gidsfiles.googlepages.com/outlook_expand_splitview.jpg[^] Continuing with my panel concept,i have a litte pin button , i tried removing the Panel from the Form.Controls collection and adding it into splitcontainer.Controls when it is clicked. Like this: Code:
private void btnPin_Click(object sender, EventArgs e) { if (splitContainer1.Panel2Collapsed) { splitContainer1.Panel2Collapsed = false; this.Controls.Remove(panel1); splitContainer1.Panel2.Controls.Add(panel1); panel1.Visible = true; } else { splitContainer1.Panel2Collapsed = true; splitContainer1.Panel2.Controls.Remove(panel1); this.Controls.Add(panel1); panel1.Location = new Point(12, 277); panel1.Visible = true; } }
Yes , it does not work at all , the panel never shows in the split container. Could someone please help out? Thanks so much GideonThats something i really want to use too. I though this controls were already available out of the box. Arent they imported somewhere? Nuno