EditorOptions

This property of the _VFP application object, added in VFP 7, lets you control various editor and IntelliSense behaviors.

Usage

_VFP.EditorOptions = cOptionString
cOptionString = _VFP.EditorOptions

Parameter

Value

Meaning

cOptionString

Character

Determines which editing options are turned on and off. There are a variety of characters that can appear in the string—see below.


EditorOptions controls five different IntelliSense and other editing features. The way you specify your choice in each case varies; these are inconsistent enough to be fairly confusing, but that's partly because some of these have two states while others have three.

Feature

Value

Meaning

List Members

"L"

List Members (the dropdown of member objects, properties, events and methods) is available automatically. That is, lists pop right up when you type the trigger, such as a "." for an object reference.

"l"

List Members is available from the menu. That is, typing the trigger does not pop up the list, but you can fire it from the menu, the context menu or the Ctrl+J shortcut.

Omitted

List Members is not available.

Quick Info

"Q"

Quick Info (the ToolTip-like window with syntax guidance) is available automatically. That is, when you type the opening "(" for a function or method, the tip appears.

"q"

Quick Info is available from the menu, the context menu or the Ctrl+I shortcut, but does not appear automatically.

Omitted

Quick Info is not available.

Designer Value Tips

"T" or "t"

Descriptive tips appear as you move through a list, such as a list of members, data types, fields, and so forth.

Omitted

Descriptive tips are not available.

Hyperlinks

"K"

If embedded hyperlinks are turned on for the file, you can use Ctrl+Click to navigate to the specified address. This setting is equivalent to checking "Embedded hyperlinks" on the Editor page of the Tools | Options dialog.

"k"

If embedded hyperlinks are turned on for the file, you can use Click to navigate to the specified address.

Omitted

Embedded hyperlinks are turned off globally. This is equivalent to unchecking "Embedded hyperlinks" on the Editor page of the Options dialog.

Drag and drop

"W" or "w"

Text can dropped only between words, not within a word. This corresponds to checking "Drag drop between words" on the Editor page of the Options dialog.

Omitted

Text can be dropped anywhere. This corresponds to unchecking "Drag drop between words" on the Editor page of the Options dialog.


Except for hyperlinks, these are all design-time only settings. That makes sense for the IntelliSense items because IntelliSense is a design-time feature. It would be nice to be able to control drag and drop between words at runtime, but at least the OLEDropTextInsertion property lets us manage that one for individual controls. As for hyperlinks, you can set EditorOptions in the runtime environment to specify how hyperlinks are handled; you may want different settings in your development environment (probably "K," so you don't keep accidentally navigating) and in your user's runtime environment (likely "k," so things behave as users expect).Be aware that there are actually three places you can turn embedded hyperlinks on and off in the VFP IDE. The setting on the Editor page of the Options dialog controls the ability globally; if it's unchecked, you can't embed hyperlinks anywhere. The IDE page of the Options dialog includes a setting for each type of file; if you turn that one off, by default, files of that type cannot have embedded hyperlinks. Finally, each file can control its own status through the Properties dialog available on its context menu. This setting can override the setting from the IDE page, but not the one from the Editor page.

Example

_VFP.EditorOptions = "LQTK" && Our preferred settings

See Also

OLEDropTextInsertion, _VFP


Back to Table of Contents

Copyright © 2002-2018 by Tamar E. Granor, Ted Roche, Doug Hennig, and Della Martin. Click for license .