View Issue Details

IDProjectCategoryView StatusLast Update
0037764LazarusLCLpublic2020-09-17 18:39
ReporterFedon Kadifeli Assigned To 
Status newResolutionopen 
PlatformLazarus 2.0.10 x86 64-linux-qtk2OSUbuntu 
Product Version2.0.10 
Summary0037764: Tmemo scrolls to the left with no reason
DescriptionThe Tmemo will scroll to the left so that the caret goes to the leftmost edge of the memo when the SelStart or SelText property is changed with code.
Steps To ReproduceCreate a Tmemo with the size of say 300 by 300 pixels. Enter two lines at design time into the memo; the first line with 10 characters and the second line with 100 characters.

Programmatically run the following code (for example by assigning to a Button's onClick event):

    Memo1.SelStart := 4;

The memo will scroll to the left so that the caret (or the fifth character of the first line) goes to the leftmost edge of the memo.

The same thing happens when you put the caret somewhere in the first characters of the line and try to insert some text with code:

    Memo1.SelText := 'XXXXX';

The expected behavior is for the Tmemo *not to scroll* unless the caret moves out of view. However, in this case TMemo scrolls as much as it can, so that the caret goes towards the leftmost edge of the Tmemo.
Additional InformationDetails can be found in the forum post:
TagsNo tags attached.
Fixed in Revision
WidgetsetGTK 2
Attached Files


There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2020-09-17 18:20 Fedon Kadifeli New Issue