Caret missing

General TRichView support forum. Please post your questions here
Post Reply
Romeo_Popescu
Posts: 6
Joined: Tue Jul 15, 2008 10:47 pm
Location: Guelph, Ontario, Canada

Caret missing

Post 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
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Caret missing

Post 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)
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Caret missing

Post by Sergey Tkachenko »

By the way, as far as I remember, TRibbon component has some problems when using in non-main forms.
Romeo_Popescu
Posts: 6
Joined: Tue Jul 15, 2008 10:47 pm
Location: Guelph, Ontario, Canada

Re: Caret missing

Post 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
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Caret missing

Post 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.
Romeo_Popescu
Posts: 6
Joined: Tue Jul 15, 2008 10:47 pm
Location: Guelph, Ontario, Canada

Re: Caret missing

Post 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
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Caret missing

Post 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.
Post Reply