Tables tremor

General TRichView support forum. Please post your questions here
Post Reply
vit
Posts: 115
Joined: Tue Feb 03, 2009 3:11 pm

Tables tremor

Post by vit »

Please perform the next actions to repeat the trouble
1. Download test project from http://depositfiles.com/files/wn10rwuo2
2. Open project from archive
3. Complile and run
4. Scroll down until D-table (rows XXXXXX and YYYYYY must be approximately in center of editor)
5. Left click on 'XXXXXX' word
6. Left click on 'YYYYYY' word

You must see that scroll's position was setted to 0, and next rows of table is selected:
dddd
dddd
dddd
dddd
XXXXXX
YYYYYY


This behavour is wrong for our application. We need for caret be visible always. And tremor should not be.

Early, when we used TRichEdit instead of TRichViewEdit, we did this manualy. Now there is a question, should we do this manualy, or we can delegate this to TRichViewEdit?
Well, it seems to we should do this manualy. Is there way to switch off the TRichViewAdit's control of visibility of caret (to disable a tremor)?

Thank you!
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Please send me this file by e-mail, I have problems downloading from depositfiles.
vit
Posts: 115
Joined: Tue Feb 03, 2009 3:11 pm

Post by vit »

I have sent file by email you asked. Did you receive it?
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Yes, I received. I'll check them as soon as it will be possible
Sergey Tkachenko
Site Admin
Posts: 17566
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

(summary of email conversation)

The problem: TRichViewEdit is inserted in TScrollBox (may be with other controls), height of TRichViewEdit is enough to display the whole document. When the caret is moved in a table cell, unexpected scrolling of TScrollBox occurs. This scrolling looks especially bad when moving from one cell to another.

Solution: disabling autoscrolling to focused control in TScrollBox.
There is no property for this, but it is possible to implement it in inherited component.

Code: Select all

type
  TMyScrollBox = class (TScrollBox)
  protected
    procedure AutoScrollInView(AControl: TControl); override;
  end;

procedure TMyScrollBox.AutoScrollInView(AControl: TControl);
begin
  // doing nothing here
end;
Post Reply