我有一份错误报告:
Collection is read only.
at System.Windows.Forms.SplitContainer.SplitContainerTypedControlCollection.SetChildIndexInternal(Control child, Int32 newIndex)
at System.Windows.Forms.Control.ControlCollection.SetChildIndex(Control child, Int32 newIndex)
at System.Windows.Forms.Control.UpdateChildControlIndex(Control ctl)
at System.Windows.Forms.Control.WmWindowPosChanged(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)我不知道它是什么,搜索只是给了我一个msdn的帖子,没有解决方案。有什么想法吗?这个异常到底是关于什么的,如果我找到了一些一般性的描述,我可能会找到解决它的方法。
发布于 2013-09-27 16:59:18
在代码中的某个地方,您试图删除SplitContainer控件的内部面板。
类似于此的内容会复制错误:
splitContainer1.Controls.RemoveAt(0);您必须在代码中搜索要删除或删除子控件的代码。可以很容易地来自递归方法。
https://stackoverflow.com/questions/19055526
复制相似问题