Caret outside margins at window startup

ScaleRichView support and discussion (TRichView add-on for WYSIWYG editing)
Post Reply
GoranBru
Posts: 23
Joined: Wed Jan 22, 2020 2:26 pm

Caret outside margins at window startup

Post by GoranBru »

Hi,
In the nearest past we have observed a strange feature in our software where the clients can write down documents. At the startup of the window, after quite some initialization procedure, if the requested view is Print (which is often) the caret is placed outside (paragraph) margins, almost left to the page border (on about 0,25mm). The caret's top position is okay. If one switches view to e.g. Draft and back using the horizontal menu buttons, then the caret is placed as expected at the left paragraph margin.
During the initialization procedure the program sets the margins for page and text border, clears all the text and paragraph styles as well as adds the default ones (two text styles and one paragraph, nothing special).
I know this is something special on this form only. I use TScaleRichView on some other forms, which are far more easy but they use draft view. I compared to the actions sample but I can't find the differences.
TRichView is 22.1, TScaleRIchView is 12.2, Delphi Sydney, Windows 10. Our software has High DPI (Per Monitor V2) enabled. Please don't ask for deo software as it is virtually impossible to make it due to the inheritance and complexitiy. Any ideas where to look?

Thanks in advance,
Goran
Sergey Tkachenko
Site Admin
Posts: 17553
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Caret outside margins at window startup

Post by Sergey Tkachenko »

Maybe the editor was not reformatted after some changes... Try calling SRichViewEdit.Format.
GoranBru
Posts: 23
Joined: Wed Jan 22, 2020 2:26 pm

Re: Caret outside margins at window startup

Post by GoranBru »

Thank You Sergey, it helped. The biggest problem was where to put the instruction - after setting page/border margins.
Post Reply