如何正确重命名 SplitContainer WinForms 控件及其面板?
我已在表单上放置了一个拆分容器,并希望将其及其面板重命名为有意义的名称(因为我将在此表单上添加更多 SplitContainer)。但是当我将 splitContainer1 重命名为 mainSplitContainer 时,它的面板仍然命名为 splitContainer1.Panel1 和 splitContainer1.Panel2 (虽然我已经没有名为 splitContainer1 的对象),但我找不到解决此问题的方法。你认识路吗?
I've placed a split container on a form and want to rename it and its panels to something meaningful (as I am going to add more SplitContainers on this form). Butwhen I rename splitContainer1 to mainSplitContainer, its panels are still named splitContainer1.Panel1 and splitContainer1.Panel2 (while i already have no object called splitContainer1) and I can't find a way to fix this. Do you know the way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您无法重命名面板,因为这些是属性而不是嵌入控件。
You can't rename panels, because these are properties not embedded controls.
您可以使用全局搜索和替换。可通过 [Ctrl] + [Shift] + [H] 访问
You could use a global search and replace. This is accessed by [Ctrl] + [Shift] + [H]