wxWidgets / wxWidgets

Cross-Platform C++ GUI Library
https://www.wxwidgets.org/
6.14k stars 1.77k forks source link

wxRichTextCtrl has some unwanted blank space at the bottom when a vertical scrollbar is present #24733

Closed wwriter closed 3 months ago

wwriter commented 3 months ago

Description

Bug description:

wxRichTextCtrl has some unwanted blank space at the bottom when a vertical scrollbar is present

Expected vs observed behaviour:

I wanted it to have a 10 px margin for all sides, so I called SetMargins(10, 10) to achieve it. image I expected the scrollbar range to end there. But what I actually see is like below. image I can move the scrollbar further down and the textbox has some unwanted blank space (pink-area in the picture) and I cannot get to the very bottom of the textbox with the arrow key. (Because that blank space does not contain any letters, not even \n)

Additional comment

I am not sure if this is an intended behavior. If so, I think I should use wxTextCtrl instead.

Platform and version information

vadz commented 3 months ago

Sorry, this control is not being actively maintained, so unfortunately the best way to find the answer to this question is to try debugging the code setting the scrolling range yourself. As the control is implemented entirely in wxWidgets, it should be relatively simple to see what it does.

If you find a bug, please don't hesitate to submit a PR with the fix. Thanks in advance and good luck!

wwriter commented 3 months ago

Thank you for the quick response. I'll do some debugging in my spare time. And as you said, if I find the cause, I'll definitely submit a PR :)