Hi,
We have code in our projects base form class to remember several user settings, such as the size of the form, and restore them the next time the form is opened. This will record and restore the position of any splitter controls using the SplitterPosition property of the winforms slitter control. I'm trying to achieve the same thing with the UltraSplitter control, but there isn't (as far as I can see) any similar property I can use. Am I missing something obvious?
One thing I'm about to try is to look at the splitter's dock style, then search for another control within the same container with the same dock style, and store that controls height or width accordingly.
Hello,
I am just checking about the progress of this issue. Let me know If you need my further assistance on this issue?
Thank you for using Infragistics Components.
Hello,
To set the position of the splitter in code, you actually set the width or height of the control that the splitter is docked next to. Docking in windows forms is actually on Z coordinates, Z coordinate depends on the index of the component in the child collection of its owner. So I could recommend instead to search with "for each" loop to use code like
Dim index As Integer = ultraSplitter.Parent.Controls.GetChildIndex(ultraSplitter)
Dim c As Control = ultraSplitter.Parent.Controls(index + 1)
In order to get the control that the splitter is docked next to in order to save its width or height.
Please let me know if you have any further questions.
Apologies, but I think you've missed the point. We want this code to run in a base class from which all other forms in the project inherit. The base form does not contain a splitter, but forms which inherit from it may contain zero, one or more splitters. Your solution would require developers to add code to each form individually.
The following code, which I mentioned previously, does what is needed, I was just wondering if it was possible to do this from the splitter control itself, without having to search through other controls
That's worked quite well, it seems. Still, if there's a more natural way to do it?