This is a migrated thread and some comments may be shown as answers.

Moving the splitter programmatically

3 Answers 209 Views
SplitContainer
This is a migrated thread and some comments may be shown as answers.
Sharon Eden
Top achievements
Rank 1
Sharon Eden asked on 19 Jul 2010, 09:38 AM
hi,

How can i move the spliiter programmatically? what i like to do is to mimic the behavior of the splitter in your examples. I intend to add a button to the panel and change the position of the splitter. I have tried to use the collapse property,  but it also hides the button. therefore i need to change the splitter position my self and leave a little space for the toggle button.

I have also tried to use the prev and next buttons on the splitter, by they are hidden as well when the panel is collapsed.

Thanks,

Sharon.

3 Answers, 1 is accepted

Sort by
0
Boryana
Telerik team
answered on 22 Jul 2010, 12:00 PM
Hi Sharon Eden,

As far as I understand you would like to change the position of a Splitter. Note that instead of changing its position, you will need to change the size of its surrounding SplitPanels. For more information and sample code please refer to this help article.

I hope this is helpful. Let me know if you have further questions.

Regards,
Boryana
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Jason
Top achievements
Rank 1
answered on 12 Dec 2018, 07:25 PM

the Splitcontainer.SplitterDistance is how many points the splitter is from the top or left of the container

for example if I have a splitcontainer taking up my whole screen the top half (.panel1) is taking up 90% of the screen and the bottom (.panel2)taking up 10% (.SplitterDistance is about 900), I set MySplitContainer.SplitterDistance = 540, now its about 50/50 top and bottom.

0
Hristo
Telerik team
answered on 14 Dec 2018, 08:58 AM
Hi Jason,

Thank you for updating the thread. We have also developed an API for collapsing the splitters programmatically: https://docs.telerik.com/devtools/winforms/controls/splitcontainer/splitter-buttons. The feature was released in the R1 2017 SP1 version of the controls: https://www.telerik.com/support/whats-new/winforms/release-history/ui-for-winforms-r1-2017-sp1-(version-2017-1-221).

Regards,
Hristo
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
SplitContainer
Asked by
Sharon Eden
Top achievements
Rank 1
Answers by
Boryana
Telerik team
Jason
Top achievements
Rank 1
Hristo
Telerik team
Share this question
or