Page 1 of 1

Caret missing

Posted: Thu May 09, 2019 4:37 am
by Romeo_Popescu
Hi Sergey,

I use the demo from ScaleRichView
\TRichView\ScaleRichView\Demos\ActionTestTabsRibbon

because I need a form with Ribbon Menu to allow some document editing in my application.
All I do is create another form and set it as main form for the project and from there I call the ribbon form:

frmMain.PopupParent := Self;
frmMain.ShowModal;

in doing so the caret is not displayed any more in the editor.
This used to work, but now the moment the main form of the project is no longer your frmMain, the caret is not displayed at all.
I was using version 17.5.2 and it worked as expected. I upgraded to 17.6.2 and now I have this problem and cannot figure it out on my own.

Many thanks for your help,
Romeo

Re: Caret missing

Posted: Fri May 10, 2019 10:08 am
by Sergey Tkachenko
Probably, it is the same problem as described here:
https://www.trichview.com/forums/viewto ... =12&t=9402
A fix was suggested in that topic (it will be included in the next update)

Re: Caret missing

Posted: Fri May 10, 2019 10:10 am
by Sergey Tkachenko
By the way, as far as I remember, TRibbon component has some problems when using in non-main forms.

Re: Caret missing

Posted: Fri May 10, 2019 4:23 pm
by Romeo_Popescu
Thank you so much for your quick response!

That did not work, but looking at the code in that unit I figured a temporary solution and added this to my onFormShow:

SRichViewEdit1.CaretBlinkTime := 500;
Application.ProcessMessages;
SRichViewEdit1.CaretBlinkTime := 400;
Application.ProcessMessages;

All is good now. Without changing the value it only works the first time the editor is shown, this way it works every time.

Thank you again for your awesome set of components and for the demos!

Greetings from Guelph, Ontario,
Romeo

Re: Caret missing

Posted: Fri May 10, 2019 6:34 pm
by Sergey Tkachenko
Can you reproduce this in a simple project? If yes, please send it to me, I'll try to find what's wrong.

Re: Caret missing

Posted: Fri May 10, 2019 8:57 pm
by Romeo_Popescu
I just sent the files by email.
Private message said the file was too large.

I am using 10.1 Berlin Enterprise, 64 bit projects.

I've also added one TgtPDFEngine and one TgtScaleRichViewInterface components to the form, maybe that caused the issue?
I've added a couple of public procedures as well in the RVARibbonFrm.pas.

Have a look, and thank you again,
Romeo

Re: Caret missing

Posted: Fri May 24, 2019 7:37 am
by Sergey Tkachenko
I cannot reproduce this problem in my version of ScaleRichView.
However, it is not ready for release yet.
If you want, I can send you a beta.