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
Already Contained Text.png (18.69 KiB) Viewed 4130 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
ClickWithScaling.png (31.73 KiB) Viewed 4130 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
AfterTypingWithScaling.png (34.79 KiB) Viewed 4130 times
After scrolling up or pressing the left arrow key, everything displays normally again.
AfterScrollUp_LeftArrow.png
AfterScrollUp_LeftArrow.png (28.01 KiB) Viewed 4130 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
RVScroller SetVPos Invalidate.png (91.35 KiB) Viewed 1717 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
TSRichViewEdit.DoOnRvRepaint Update and Invalidate.png (81.23 KiB) Viewed 1717 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.