Foxtools – Editor _EDDELETE

Version: 01.00.00 - last Update: Tuesday, October 13, 2009, 12:05:00

Previous ChapterFoxtools Home (Alphabetical TOC)Foxtools Home (Grouped TOC)Next Chapter See also:_EdOpenFil | _EdCloseFi | _EdRevert | _EdSelect | _EdIndent | _EdInsert | _EdSendKey | _EdComment


Foxtools Editor Support Functions

_EDDELETE

_EdDelete() Deletes the highlighted text of the editor session passed in <nWHAND> parameter.

VFP Syntax

= _EdDelete(nWHAND)

Parameters

[in] nWHAND

Fox-window handle of the editor session to be closed.

Returns

VOID - no evaluable return value, coz always TRUE.

Remarks

You do not need to open the Windows Clipboard manually. _EdDelete() does the Windows Clipboard handling for you behind the scenes transparently. If no text is highlighted _EdDelete() just does nothing (the character to the right of the current cursor position is NOT deleted, as stated in FoxPro’s API documentation).

VFP Example(s)

Opening an editor session, selecting some text and finally delete the selected lines:

*\\ Open editor session
*\\ There should be some text in TEST.TXT 
nWHAND =_EDOPENFIL("TEST.TXT", 1) 
*\\ Start offset: row #1 
nEDstart = _EDSKIPLIN(m.nWHAND,0,0) 
*\\ End offset: row #10 
nEDend = _EDSKIPLIN(m.nWHAND,0,10) 
*\\ Highlight text block 
= _EDSELECT(m.nWHAND, m.nEDstart, m.nEDend) 
*\\ Finally copy selection to clipboard 
= _EDDELETE(m.nWHAND) 
*\\ Close editor session – ask to SaveAs
= _EDCLOSEFI(m.nWHAND, 2)
*//

Previous ChapterFoxtools Home (Alphabetical TOC)Foxtools Home (Grouped TOC)Next Chapter