Page 1 of 1

Tables tremor

Posted: Wed Mar 24, 2010 3:04 pm
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!

Posted: Wed Mar 24, 2010 6:39 pm
by Sergey Tkachenko
Please send me this file by e-mail, I have problems downloading from depositfiles.

Posted: Thu Mar 25, 2010 4:10 pm
by vit
I have sent file by email you asked. Did you receive it?

Posted: Thu Mar 25, 2010 6:06 pm
by Sergey Tkachenko
Yes, I received. I'll check them as soon as it will be possible

Posted: Sun Apr 04, 2010 6:21 pm
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;