How can select a block?

General TRichView support forum. Please post your questions here
Post Reply
PZG
Posts: 3
Joined: Wed Sep 15, 2021 11:36 am

How can select a block?

Post 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
standay
Posts: 274
Joined: Fri Jun 18, 2021 3:07 pm

Re: How can select a block?

Post 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
Sergey Tkachenko
Site Admin
Posts: 17554
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: How can select a block?

Post 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.
Post Reply