Sometimes, I have to clone a Row (or more) and modify it a little bit later. till now, I use cmd-c (ctrl+c) Copy / cmd-v (ctrl+v) Paste. Earlier today, I had the idea to use a different way: use Drag Row + Option Key Down.
The code below
Append a copy of the selected Row(s), but also moves the selected Rows to the mouse released position:
[code] If Keyboard.AsyncOptionKey Then
Loop Until Not Obj.NextItem
As you can notice, I added a
Return line before the
End If line as a try to disable the automatic Drag Rows
but this failed.
I also added (as the first line):
#Pragma Unused obj
just in case it will disallow the standard Drag (move), but this failed too.
It also add a “parasite” empty row (I do not know from where these Return can come).
You may ask me how do I know it is not my code that moves the selected row. The answer is very simple: the demo Rows holds more than one Column (in fact 4 columns), and so, my code * create one Column Row(s), moved Rows have the 4 Columns.
- my code is in fact Xojo code, excepted for the
If Keyboard.AsyncOptionKey Then / End Iflines.
Of course, the only case where the original Rows are not moved is when I copy the last Rows ;-