Page 1 of 1

Cursor not showing when TSRichViewEdit is in a VCL Frame

Posted: Thu Dec 13, 2018 4:15 pm
by rron
If I place a TSRichViewEdit in a frame, the cursor is not shown. When I place the same TSRichViewEdit directly in the form that contains the frame, the cursor is visible (and blinking). Using Delphi 10.3 Rio and ScaleRichView-Pre9.

Re: Cursor not showing when TSRichViewEdit is in a VCL Frame

Posted: Wed Dec 26, 2018 4:15 pm
by Sergey Tkachenko
I confirm the problem.
Quick fix: open <TRichView Dir>\ScaleRichView\Source\SclRView.pas, add to the end of the procedure TSRichViewEdit.CreateWnd:

Code: Select all

  if srvs_TimerCaret in FState then
    UpdateCaretTimer;

Re: Cursor not showing when TSRichViewEdit is in a VCL Frame

Posted: Fri Mar 22, 2019 6:30 pm
by Tavo
Hi!
I recently updated my version of ScaleRichView. I find this same problem: Cursor not showing when TSRichViewEdit is in a VCL Frame.
The same form (with a frame with a ScaleRichView) was working well until the update. The only problem that I have detected so far is that the cursor does not to blink.
Within TSRichViewEdit.WndProc(), execution enters into the second IF only once, at first. Is that data useful?

In SclRView.pas

Code: Select all

procedure TSRichViewEdit.WndProc(var Message: TMessage);
begin
  inherited;
  if IsNotRunTimeMode then
    exit;

  if not(srvs_TimerCaret in FState) and HandleAllocated then
  begin
    Include(FState, srvs_TimerCaret);
    FPageProperty.PageWidth := FPageProperty.PageWidth;
    FPageProperty.PageHeight := FPageProperty.PageHeight;
    UpdateView;
    UpdateCaretTimer;
    OldPageCount := 0;
    CalculatePageCount;
  end;
end;
Thanks for readme

Re: Cursor not showing when TSRichViewEdit is in a VCL Frame

Posted: Sat Mar 23, 2019 9:30 am
by Sergey Tkachenko
Did you apply the fix I posted in this topic?

Re: Cursor not showing when TSRichViewEdit is in a VCL Frame

Posted: Mon Mar 25, 2019 2:17 pm
by Tavo
Hello Sergey, thanks for answering.
I had not done it because-this post being so old-I thought it was already incorporated into the library.
I just did it and it works perfect! :-)
Thank you!

Re: Cursor not showing when TSRichViewEdit is in a VCL Frame

Posted: Tue Sep 24, 2019 8:22 am
by Pieter E.
Hi, last week I upgraded TSRichViewEdit to the latest version. I found out that this issue is not fixed in the latest release. Is there a specific reason why this fix is not included?

Re: Cursor not showing when TSRichViewEdit is in a VCL Frame

Posted: Tue Sep 24, 2019 9:00 am
by Sergey Tkachenko
Because there were no updates yet. The next update is almost ready, it will be released in this week.

Re: Cursor not showing when TSRichViewEdit is in a VCL Frame

Posted: Tue Sep 24, 2019 11:55 am
by Pieter E.
Thank you for your answer. Looking forward to see the new update. :D