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!
Tables tremor
-
- Site Admin
- Posts: 17566
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17566
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17566
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
(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.
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;