Hacker’s Guide to Visual FoxPro
An irreverent look at how Visual FoxPro really works. Tells you the inside scoop on every command, function, property, event and method of Visual FoxPro.
This property determines whether an object lets you insert text into the middle of words with OLE Drag and Drop
, or only at the ends of words.
oObject.OLEDropTextInsertion = nInsertionType
nInsertionType = oObject.OLEDropTextInsertion
Parameter |
Value |
Meaning |
nInsertionType |
0 |
This object lets you put dragged text anywhere. |
1 |
This object always puts dragged text at the beginning of a word. |
Of all the OLE Drag and Drop
properties, this might be the easiest to understand. It determines, for a drop target, whether text dropped on that target gets inserted exactly where the pointer is positioned or only at the beginning of a word. When you set the property to 1, no matter where the pointer is placed, the dragged text goes at the beginning of that word. When it’s 0 (the default), text goes right where you put it. We can see the need for each choice for different situations, and, in fact, could even see this one as user-configurable.
There's only one little problem. They broke it. In VFP 7, no matter which way this property is set, text gets dropped at the pointer position. |
The name of this property makes sense to us; so does its behavior. But somehow, we feel a slight mismatch between those two and the values it accepts. We’re not sure exactly what we would use if it were up to us, though; .T. and .F. don’t cut it, either. We do find the settings kind of backward. 0 feels like “off” to us, but putting dragged text anywhere seems like “on.” We guess we’ll get used to it eventually.
* Set this property based on the user's choice.
IF lPutTextAnywhere
This.OLEDropTextInsertion = 0
ELSE
This.OLEDropTextInsertion = 1
ENDIF