Page 1 of 1
Text disappears after Typing in ScaleRichView with scaling (150%)
Posted: Tue Nov 26, 2024 4:22 pm
by tomr
Hi, I have the following problem:
In my program, I use the ScalerichviewEdit. In Windows, a scaling of 150% is configured.
The Scalerichview already contains the following Text:

- Already Contained Text.png (18.69 KiB) Viewed 123431 times
If I open the text with scaling and click at the end of the text, the cursor seems to change to the beginning.

- ClickWithScaling.png (31.73 KiB) Viewed 123431 times
Additionally, I can not properly select the different parts of the text.
If I manually change the cursor to the end of the document and type in one letter the ScaleRichview is displayed white.

- AfterTypingWithScaling.png (34.79 KiB) Viewed 123431 times
After scrolling up or pressing the left arrow key, everything displays normally again.

- AfterScrollUp_LeftArrow.png (28.01 KiB) Viewed 123431 times
Do you have any suggestions regarding what might be causing this issue? If you need more information about the properties or settings, please let me know.
Thank you!
Re: Text disappears after Typing in ScaleRichView with scaling (150%)
Posted: Wed Nov 27, 2024 8:44 am
by Sergey Tkachenko
I cannot reproduce this problem.
Do you use the newest version of ScaleRichView?
Re: Text disappears after Typing in ScaleRichView with scaling (150%)
Posted: Wed Nov 27, 2024 12:14 pm
by tomr
Hi Sergey,
yes i use the newest version of Scalerichview.
i tried reproducing this effect using the Scalerichview "Action Test Demo". Unfortunately i could not reproduce it.
It seems like this is a problem caused by other code.
Re: Text disappears after Typing in ScaleRichView with scaling (150%)
Posted: Mon Dec 16, 2024 10:11 am
by tomr
Hi Sergey,
After analyzing and debugging my Code I found a solution for my described issue.
If I use an invalidate instead of an update in the method TRVScroller.SetVPos

- RVScroller SetVPos Invalidate.png (91.35 KiB) Viewed 121018 times
everything is displayed correctly.
It seems that the difference between these two is that invalidate is handled with "post message" and update with "send message."

- TSRichViewEdit.DoOnRvRepaint Update and Invalidate.png (81.23 KiB) Viewed 121018 times
Would it not be better to use invalidate instead to ensure that the scalerichview updates? Or could these changes create other problems?
Re: Text disappears after Typing in ScaleRichView with scaling (150%)
Posted: Mon Dec 16, 2024 3:35 pm
by Sergey Tkachenko
Maybe you can reproduce this problem in a sample project?
In TSRichViewEdit, there is an invisible internal TRichViewEdit. When it is invalidated, it sends message to TSRichViewEdit to repaint the corresponding area.
But;
1) This hidden TRichViewEdit should not be scrolled (or, at least, redrawing of TSRichViewEdit should not rely on its scrolling)
2) In SetVPos, ScrollWindowEx invalidates newly shown area.
Re: Text disappears after Typing in ScaleRichView with scaling (150%)
Posted: Mon Apr 27, 2026 6:34 am
by tomr
Hi Sergey,
You can go ahead and close this topic. I didn’t find a direct solution to the original problem, but I’ve switched to a different approach for scaling my ScaleRichEdit.
I’ve set the “Scaled” property of the editor form (the form that contains the ScaleRichEdit) to false, and now handle scaling via the Zoom factor of the ScaleRichEdit instead. It seems that manually adjusting and scaling the page width was causing the issue.
Thanks anyway!
Kind Regards
Tom