View Issue Details

IDProjectCategoryView StatusLast Update
0037764LazarusLCLpublic2020-09-17 18:39
ReporterFedon Kadifeli Assigned To 
PrioritynormalSeverityminorReproducibilityalways
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: https://forum.lazarus.freepascal.org/index.php?topic=51429
TagsNo tags attached.
Fixed in Revision
LazTarget
WidgetsetGTK 2
Attached Files

Activities

There are no notes attached to this issue.

Issue History

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