根据窗口,工具条不会拉伸和自动调整! (在 C# 中,使用 Visual Studio 2010)
我是一名初学者编码员,在对浏览器进行编码时遇到了一个主要问题。问题基本上全归功于工具条。
这是我的问题: 1)当我设计所有的东西时,我安排了所有的按钮和文本框! 当我运行我的程序时,一切都运行良好。看一下图片。
https://i.sstatic.net/5GHZ8.png
现在...
2) 现在,在我按下最大化按钮后,事情变得非常混乱...!看看图片吧!
https://i.sstatic.net/cfVUK.png
现在我应该做什么?请帮忙!
I am a beginner coder and I have a major problem when I am coding my browser. The problem is basically all thanks to the tool strip.
Here is my problem:
1) When I was designing all the stuff, I arranged all the buttons and text boxes!
When I ran my program, it was all working good. Take a look at the picture.
https://i.sstatic.net/5GHZ8.png
And now...
2) Now, after I pressed the maximize button, things were badly unarranged...! Take a look at the picture !
https://i.sstatic.net/cfVUK.png
Now what should I do? Please help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您好,欢迎来到 C# 和 StackOverflow!
您需要能够告诉 Visual Studio 哪个元素将随窗口调整大小以及哪些元素将保持相同的宽度等。这是使用 LayoutPanel 完成的,在您的情况下最适合的是 TableLayoutPanel。然后,您可以将所有元素停靠在适当的表格单元格中,并告诉单元格如何调整大小(您甚至可以使用比例!)。当然,您可以将第二行设置为显示网页的区域,并告诉第一个单元格跨越所有列( http://msdn.microsoft.com/en-us/library/ms171687%28v=VS.80%29.aspx)。
这里有一个指南:http://msdn。 microsoft.com/en-us/library/w4yc3e8c%28v=VS.80%29.aspx
Hi there and welcome to C# and StackOverflow!
You need to be able to tell Visual Studio which element will get resized with the window and which elements will stay at the same width, etc. This is done using LayoutPanels, in your case best suited is TableLayoutPanel. You can then dock all elements in their appropriate table cells and tell the cells how to size (you can even use proportions!). You can of course make the second row the area, where the web page is displayed and tell the first cell to span across all columns ( http://msdn.microsoft.com/en-us/library/ms171687%28v=VS.80%29.aspx ).
There's a guide here: http://msdn.microsoft.com/en-us/library/w4yc3e8c%28v=VS.80%29.aspx