Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Turn Word Wrap On/Off programmatically?
Message
 
 
To
27/01/2003 14:47:49
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00745936
Message ID:
00746179
Views:
24
You can use FoxTolls _Ed* functions to do that. Here's a basic code that demonstrates how it can be done. It assumes, that FoxTolls.fll is already loaded.
LOCAL lnHandle, lnResult, laEnv[25]
* Get the whandle for the current window
lnHandle = _WonTop()
* Get the environment settings for a text or program file opened for editing.
lnResult = _EdGetEnv( lnHandle, @laEnv )
IF ( lnResult = 0 )	;	&& Call to _EdGetEnv was unsuccesfuull
		OR EMPTY(laEnv[1]) 	&& Empty file name
	RETURN
ENDIF
* laEnv[16] - WOrd Wrap, 1-Yes, 0-No
laEnv[16] = IIF( laEnv[16]=1, 0, 1)
lnResult = _EdSetEnv( lnHandle, @laEnv )
RETURN
>I'm Using VFP7.0
>
>Is there any way to programically turn Word Wrap On/Off in the Editor? Other than with a macro?
>
>TIA
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform