Making a rectangular selection in a RichTextBox with Alt-Left-Mouse sweep?
Posted
by Harold Bamford
on Stack Overflow
See other posts from Stack Overflow
or by Harold Bamford
Published on 2010-06-03T18:59:26Z
Indexed on
2010/06/03
20:34 UTC
Read the original article
Hit count: 283
There are quite a few applications that allow you to select a box or rectangle of text by sweeping with mouse while the Alt key is pressed. Visual Studio 2010 does this in the code editor, for instance. Emacs does it. Winword does it. We've all seen it. It seems like there must be a standard pattern to follow to encode this behavior but I cannot seem to find it.
I suspect I am not Googling with the correct keywords as all I am getting are false hits on rectangle, Alt-Left, sweep, selection, etc.
I'm sure I can code it up but it would mean disabling the normal selection code used in, say, RichTextBox. And that sounds ugly, error prone and probably more work than it is worth.
Anybody have a suggestion (be nice! :-) ) of how to do this or an example of how it is done?
© Stack Overflow or respective owner