Foxtools – Editor _EDACTIVE

Version: 0.01.00 - last Update: Tuesday, October 13, 2009, 11:45:00

Previous ChapterFoxtools Home (Alphabetical TOC)Foxtools Home (Grouped TOC)Next Chapter See also:_EdSetPos | _EdSToPos | _EdSToSel

Foxtools Editor Support Functions


_EdActive() Hides or shows the caret of any editor session window passed in <nWHAND> parameter.

VFP Syntax

= _EdActive(nWHAND, lShowHide)


[in] nWHAND

Fox-window handle of the editor session.

[in] lShowHide

Boolean flag value; TRUE shows the caret, FALSE hides the caret


VOID - no evaluable return value, coz always TRUE.


This command do work although in other documentations stated it don’t. My results are based on three facts: 1st, you have to pass the right editor session handle and 2nd, the editor session must not have the focus and 3rd, if there is any text selected, this selection cannot be hidden by calling _EdActive(n,.F.). Any selected text stays untouched unlike stated in other documentations!

1st: If the <nWHAND> parameter points to some Fox-window (not a editor session one), the _EdActive() function fails silently.
2nd: At the moment the editor session window gets back focus (you click, into the text area), VFP redisplays the caret immediately.
3rd: If there is any selected text (which hides the caret automatically) the function has no effect at all.

VFP Example(s)

Displaying/hiding the caret can be accomplished with the following:

ON KEY LABEL     F12 _EdActive(nWHAND,.F.)
ON KEY LABEL Alt+F12 _EdActive(nWHAND,.T.)
This is an interactive test scenario that should work when you do the following steps:
1st: activate the three on key label hooks above.
2nd: activate any editor session window, then press F11
3rd: with the editor session window open (and the caret visible) go to command window, next press F12 / Alt+F12

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