积极答复者
这个是不是visual Studio 的一个bug?

问题
-
Visual Studio 2008 新建一个普通winform项目。
在窗体中添加一个GroupBox控件,然后在这个GroupBox控件中随便添加一些东西,例如添加三个Button,
分别把这三个Button的Dock属性设置为Top,并把在最上面的那个Button的Visible属性设置为False
在运行程序时候,因为在最上面的那个按钮是不显示的,而另外两个按钮的dock属性为Top,它们应该往上移,将原来最上面的按钮的位置填充,
但是事实并不是这样的,运行时,第一个隐藏按钮的位置依然被空了出来。不过,你要是在窗体运行时候通过其他事件触发,让上面的按钮隐藏,下面的两个,就可以补上去!。
是我的Visual Studio安装的问题?还是本来就有这个Bug?
有没有什么好的方法解决吗?
以上问题,在VB和C#都会存在。
I am Rayman Zhai- 已移动 feiyun0112Moderator 2009年8月31日 2:05 (发件人:Visual Basic)
- 已移动 Sheng Jiang 蒋晟Moderator 2009年8月31日 16:20 Windows表单类库问题 (发件人:Visual Studio 相关讨论)
- 已更改类型 YiChun Chen 2009年9月1日 6:36
答案
-
你好!
我已经在自己的机器上重现了你的问题。这是Visual Studio 2008本身的设计。这不是安装没装好产生的。
我建议你可以在Form_Load的事件中,通过代码将下面的两个Button的位置上移。
例如:
private void Form1_Load(object sender, EventArgs e) { button2.Location = new Point(50, 50); }
你也可以将你关于这个情况的反馈,通过https://connect.microsoft.com/VisualStudio这个链接提出你宝贵的建议。
谢谢你!
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- 已建议为答案 Raymond TangModerator 2009年9月1日 9:22
- 已标记为答案 邹俊才Moderator 2009年9月1日 10:47
全部回复
-
你好!
我已经在自己的机器上重现了你的问题。这是Visual Studio 2008本身的设计。这不是安装没装好产生的。
我建议你可以在Form_Load的事件中,通过代码将下面的两个Button的位置上移。
例如:
private void Form1_Load(object sender, EventArgs e) { button2.Location = new Point(50, 50); }
你也可以将你关于这个情况的反馈,通过https://connect.microsoft.com/VisualStudio这个链接提出你宝贵的建议。
谢谢你!
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- 已建议为答案 Raymond TangModerator 2009年9月1日 9:22
- 已标记为答案 邹俊才Moderator 2009年9月1日 10:47