Foxtools – Editor _EDSELECT

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

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


Foxtools Editor Support Functions

_EDSELECT

_EdSelect() Selects a range of characters in the editor session passed in <nWHANDL>.

VFP Syntax

= _EdSelect(nWHAND, nOffset1, nOffset2)

Parameters

[in] nWHAND

Fox-window handle of the editor session in question. If nWHANDL is no valid editor-session handle, an error “API call caused an exception” (Error 2028) is raised.

[in] nOffset1

Position in text buffer where selection starts. This start offset value is zero-based counted from begin of file (BOF).

[in] nOffset2

Position in text buffer where selection ends. This end offset value is zero-based counted from begin of file (BOF).

    Returns

    VOID - no evaluable return value, coz always TRUE.

    Remarks

    Which text block is currently selected can be retrieved using elements# 17 to 19 of the environment info-array returned by _EdGetEnv(). To unselect any text, just pass the same value in <nOffset1> and <nOffset2> to _EdSelect() like so:
    = _EdSelect(m.nWHAND, 0, 0)

    VFP Example(s)

    Opening an editor session, selecting a block of text:

    *\\ Open editor session
    nWHAND =_EDOPENFIL("TEST.TXT", 1)
    *\\ select characters 1 to 10
    ? _EDSELECT(m.nWHAND, 0, 9)

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