Page 1 of 1

How can select a block?

Posted: Thu Jan 20, 2022 11:28 am
by PZG
In Notepadd++ this is done by holding ALT, clicking and draging the mouse and you can select a block.
Could you write a example about that using TRichViewEdit?
Thank you

Re: How can select a block?

Posted: Thu Jan 20, 2022 4:38 pm
by standay
I doubt if you can do that with this component. Notepad++ uses Scintilla as the editing component. It's made for that kind of stuff (see https://www.scintilla.org/ScintillaDoc.html ). I think they call that rectangular selection. Scintilla is made more for code style editors, while the rich view is made more for formatting style editors. You'd probably want to pick what kind of app you are doing and then select the component most suited for that purpose.

However, Sergey may have a way to do this or to approximate it, so maybe he'll have an idea for you.

Stan

Re: How can select a block?

Posted: Thu Jan 20, 2022 7:47 pm
by Sergey Tkachenko
It is not possible.
In TRichView, selection is continuous: it is defined by a starting and an ending position.
A block selection would require a selection consisting of several fragments that are not adjacent.
Not planned for near future, sorry.