Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
1.11/5 (2 votes)
I was wondering if there was a way to have a winform with split container that you can slide out by click of a button. I do not want to spend to purchase license on expensive UI controls or a toolbox.
Posted
Updated 3-Mar-14 13:12pm
v2
Comments
Sergey Alexandrovich Kryukov 3-Mar-14 19:06pm    
"If anyone is aware... " cannot be counted as a real question. Of course, any decent UI developer will easily implement anything like that in no time...
It sounds like you demonstrate the cofnitive bias well known as the Dunning–Kruger effect, at least at item #2. Just think about it.
—SA

Why buying anything if you have two controls to choose from? Please see System.Windows.Forms.Splitter and System.Windows.Forms.SplitContainer:
http://msdn.microsoft.com/en-us/library/system.windows.forms.splitcontainer%28v=vs.110%29.aspx[^],
http://msdn.microsoft.com/en-us/library/system.windows.forms.splitter%28v=vs.110%29.aspx[^].

I don't understand why would you want to do anything on click (splitters work by dragging), but nothing prevents you from handling the click events on any control you use.

—SA
 
Share this answer
 
v3
Do you want the splitter to "slide out" when a button is clicked? If so, just toggle one of the panel collapsed properties for the SplitContainer in your button handler. For example,

C#
private void Button_Click(sender, e)
{
    this.splitContainer1.Panel1Collapsed = !this.splitContain1.Panel1Collapsed;
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900