Cursor not showing when TSRichViewEdit is in a VCL Frame

ScaleRichView support and discussion (TRichView add-on for WYSIWYG editing)
Post Reply
rron
Posts: 5
Joined: Tue Mar 25, 2008 12:14 am
Contact:

Cursor not showing when TSRichViewEdit is in a VCL Frame

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

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

Post 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;
Tavo
Posts: 175
Joined: Sat Sep 24, 2005 9:25 pm
Location: Buenos Aires, Argentina
Contact:

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

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

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

Post by Sergey Tkachenko »

Did you apply the fix I posted in this topic?
Tavo
Posts: 175
Joined: Sat Sep 24, 2005 9:25 pm
Location: Buenos Aires, Argentina
Contact:

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

Post 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!
Pieter E.
Posts: 835
Joined: Sun Aug 28, 2005 9:34 am

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

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

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

Post by Sergey Tkachenko »

Because there were no updates yet. The next update is almost ready, it will be released in this week.
Pieter E.
Posts: 835
Joined: Sun Aug 28, 2005 9:34 am

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

Post by Pieter E. »

Thank you for your answer. Looking forward to see the new update. :D
Post Reply