Hello,
I noticed a problem in wxPropertyGrid (wxWidgets 3.3.1 on Windows 11, Visual C/C++) that can be reproduced with the propgrid example.
The problem occurs when selecting a property with a relatively long help text:
If the window is resized smaller, the help text is correctly wrapped and adapted to the new size. However, when the window is resized larger again, the help text does not re-expand to fit the increased width.
Thanks,
Claudio
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I can indeed reproduce this with "ArrayDoubleProperty". I'm not sure how exactly is help text wrapped in wxPG and don't have time to look at this now, but it should probably be rather simple to fix by just rewrapping it when the size increases too.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
wxPG is calling Wrap. (see src/propgrid/manager.cpp#L1487
The cause of this issue is that wxStaticText::Wrap does modify the label (see https://github.com/wxWidgets/wxWidgets/blob/0e8fcfe8e32eab0cf203f99c090fb38206606099/include/wx/stattext.h#L38C1-L41C26 )
So when calling with a small width there gets linebreaks added to the label and when calling Wrap with a higher width these linebreaks remain and the higher wrap width has no effect.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Thanks for the analysis.
FWIW this looks related to/could be fixed by #25753.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
The merged branch fixes the wrapping issue. But it shows some bug in the new code.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
The merged branch fixes the wrapping issue. But it shows some bug in the new code.
Thanks, I see this, looking...
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I've fixed the bug in Wrap() which you noticed in the PR linked above and then also stopped using Wrap() in wxPG code as it's not necessary any more. Please let me know if you still see any problems, otherwise I'll merge that PR soon.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I tested the PR and it looks good now. Thanks.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Closed #25795 as completed via 66c5482.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()