Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
251 views
in Technique[技术] by (71.8m points)

visual studio - Autosizing form to stop controls from overlapping - VB.NET

I am currently designing a form for my business - but struggling to implement a feature.

The image below is of the bottom half of a form - I had to blur/remove quite a lot for data privacy reasons. There are two group boxes here (one on the left and the other on the right).

The blue area is a tool strip. The greyed out areas represent apps. The application itself is basically an app launcher that allows the users to add apps to the tool strip.

Right now I've set the tools strip's LayoutStyle to Flow and the AutoSize to False

This means that when there are only enough apps to fill one row on the tool strip, it all looks fine, with some space between the bottom of the GroupBoxes and the top of the tool strip

However when I add enough apps that there needs to be two rows on the tool strip, the tool strip expands to two rows (represented in the image).

This is what I want, however as can be seen from the image, the tool strip now covers up part of the Groupboxes.

So I think what I want is for the actual form to expand when the tool strip expands, maintaining an same distance between the bottoms of the Groupboxes and the top of the tool strip.

Can this be done simply by setting some properties, or is there a way to do this programatically?

enter image description here

question from:https://stackoverflow.com/questions/65541058/autosizing-form-to-stop-controls-from-overlapping-vb-net

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...