开发者

Tool Strip wont stretch and autofit, according to the window! (in c#, using Visual Studio 2010)

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 t开发者_StackOverflowhe 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.

http://i.stack.imgur.com/5GHZ8.png

And now...

2) Now, after I pressed the maximize button, things were badly unarranged...! Take a look at the picture !

http://i.stack.imgur.com/cfVUK.png

Now what should I do? Please help!


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜