简体   繁体   中英

C# Windows Forms - Scrollbar on Richtextbox does not show up for a second time

I have a RichTextBoxElement on my form. When I start my application the element looks like this:

在此处输入图片说明

After that, I drag the window bigger, that the vertical scrollbar leaves. Picture:

在此处输入图片说明

So when I drag the window smaller again, the scrollbar should come back and appear, but it does not. Picture:

在此处输入图片说明

Maybe it is helpful to see my properties for this element:

在此处输入图片说明

Thanks for help!

I am able to reproduce the issue.

Seems like a bug to me. Notice: if you increase the height of window scrollbar will appears properly, but not when you decrease it.

You can use workaround:

void richTextBox1_SizeChanged(object sender, EventArgs e) => richTextBox1.Refresh();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM