Hi there,
I am getting a strange error with my SplitContainer when trying to manually set the SplitterDistance value.
The SplitContainer.Orientation is set to Orientation.Horizontal, the SplitContainer.Panel1MinSize is set to 25, the SplitContainer.Width is set to 150, and the SplitContainer.Panel2MinSize is set to 25.
When I try to set the SplitContainer.SplitterDistance value to 100, I get an error saying "SplitterDistance must be between Panel1MinSize and Width - Panel2MinSize". However, I am doing just that.
Any ideas why I am getting this error message
The exception message is of type InvalidOperationException. According to my MSDN this exception means "The value is incompatiable with the orientation". However, MSDN specfically states that SplitterDistance is valid for use with both the Orientation.Horizontal and Orientation.Vertical values.
Also, I should note that I only get this error message when I try to manually set the SplitterDistance value after having added the SplitContainer to another Control. If I set the SplitterDistance value before adding the SplitContainer to the parent Control, I don't get the error message. However, the SplitterDistance value doesn't actually change either.
Any help would be appreciated. Thank you