有人知道如何将 RichTextBox 控件动态调整为其内容的大小吗?
最佳答案
我想我太晚了,但看看 this
它只是两行代码:
private void rtb_ContentsResized(object sender, ContentsResizedEventArgs e)
{
((RichTextBox)sender).Height = e.NewRectangle.Height + 5;
}
关于winforms - 自动调整 WinForms RichTextBox 到其内容,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/733566/