Wish I'd like to see IDE Editor have Block Text select

Widget

Well-Known Member
Licensed User
Longtime User
In Delphi we could select a rectangular block of text in the editor by holding down Alt-Shift and use the arrow keys to select the block of text that can include several lines of text. (see image)

When the text was selected in this way, we can delete it with the DEL key, copy it with Ctrl-C then paste this selected rectangular text to another location with Ctrl-V and indent/outdent the text (starting at first selected column) with Ctrl-I/Ctrl-U.

I really miss this capabilities in B4x. It really helps me maintain my code better.
EditorBlockSelect.PNG
 

Widget

Well-Known Member
Licensed User
Longtime User
Well that was quick. o_O

Is this documented somewhere?

The one flaw I see with this is the width of the selected rectangle is controlled by the width of the top and bottom lines being selected. The width of the rectangle will continually snap left and right as the rectangle is dragged downward. In other words the CRLF of the first and last line will determine the width of the rectangle. It does not work this way in Delphi or Notepad++.

Example. In your selection example, if you try and move the selected rectangle down one more line to "End Sub", the width of selected rectangle will snap to the left. I would prefer to see the selected rectangle width NOT be controlled by CRLF in the lines as it is being dragged (width should not snap back and forth). (spaces would be added to the shorter lines to make up for the missing text in the rectangle.)

TIA
 

Widget

Well-Known Member
Licensed User
Longtime User
Yes :) !
In the new edition 3.3 of the B4A Beginner's Guide chapter 4.2.7 Copy a selected bloc of text.

Yes, the "mailman" just delivered my copy yesterday hot off the presses. :cool:
I am eager to crack it open to see the new stuff that's been added.

Thanks again for all your hard work.
 
Top