Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

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

c# - How to make component fill all avaible space in Windows form using Docker and Anchor properties?

I want to make component to fill all available space, unfortunately it's only fill width, height stays the same. Why fill does not fill?

Windows form with one horizontal split, each part contain one TextBox that is supposed to fill all available space. Windows form with one horizontal split, each part contain one TextBox that is supposed to fill all available space

Layout properties of TextBox.

Layout properties of TextBox.


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

1 Answer

0 votes
by (71.8m points)

For a TextBox you have to set its Multiline property to True.

enter image description here

or

in code:

textBox1.Multiline = true;

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...