TextBox horizontal-scroll bug
There appears to be a bug in the Win32 edit control that WinForms.TextBox wraps:
- Open Notepad.
- Make s开发者_Python百科ure that the bottom scrollbar is visible (you may have to turn off word wrapping).
- Enter a long line, so that the bottom scrollbar activates.
- Delete some of this text, so that the line becomes much smaller.
Now the bottom scrollbar doesn't update to reflect the fact that the line is now much smaller.
In fact, even if you resize the window, the scrollbar still seems to think that we have a huge line. The only work-around seems to be enabling and disabling word wrapping.
Can anyone suggest a way to fix this from a WinForms .NET app?
Another workaround is when the additional text is deleted .. cut the remaining text and then paste it again. That makes scroll bar disappear.
You can hit CTRL+A to select all text then CTRL+X to cut and CTRL+V to paste.
Just an idea.
精彩评论