user1580348
user1580348

Reputation: 6051

How to programmatically set a text-selection in TBCEditor?

I use this version of TBCEditor in Delphi 10.4.1:

https://github.com/maciej-izak/TBCEditor-1

When I try to programmatically set a text-selection:

Editor.SelectionBeginPosition.Line := i;

...then the compiler shows this error message:

[dcc32 Error] Form1.pas(422): E2064 Left side cannot be assigned to

So how can I programmatically set a text-selection in TBCEditor?

Upvotes: 1

Views: 124

Answers (1)

fpiette
fpiette

Reputation: 12292

I never used that control but I had a look at the source code and found at line 652 a method that seems to do what you are looking for: SetCaretAndSelection.

Upvotes: 2

Related Questions