*************************************************
Text Wrapper
******************
***    Author: Rick Strahl
***            (c) West Wind Technologies, 1995
***   Contact: 76427,2363 (CompuServe)
***            rstrahl@west-wind.com (Internet)
***            http://www.west-wind.com/tech
***            (503) 386-2087  
***
***            400 Morton Road
***            Hood River, OR 97031
**************************************************

This simple form based, text wrapping utility handles quickly grabbing a string of text from the clipboard and wrapping it with a leading and trailing string of characters. I find this invaluable when creating HTML forms, by being able to grab the bulk of the text from an existing form, and automatically wrapping the text in the VFP functions/methods that are used to create the HTML document. It's easy to customize the output or use it as a starting point for data driven HTML generation.

How it Works
------------
WRAPPER.SCX works by taking the text contained in the clipboard and showing it the wrapper screen. The screen contains a pair of fields to allow you to specify a leading and trailing string for each line of text that is displayed.

For an example, open an HTML document with the VFP editor and paste the text to the clipboard. Then set the StartString to Send(" and the EndString to "). Then hit Preview to see the result...

Original:
---------
<HTML>
<HEAD><TITLE>West Wind Technologies</TITLE></HEAD>
<BODY>
<H1>Hello World</H1>
<HR>
<H3>This is a header tag</H3>
	
Pasted into code:
-----------------
loHTML.Send("<HTML>")
loHTML.Send("<HEAD><TITLE>West Wind loHTML.Technologies</TITLE></HEAD>")
loHTML.Send("<BODY>")
loHTML.Send("<H1>Hello World</H1>")
loHTML.Send("<HR>")
loHTML.Send("<H3>This is a header tag</H3>")

The leading string is "loHTML.Send([" while the trailing string is the closing parens, '")'.


How to Use it
-------------
Since WRAPPER is a form you can simply DO FORM WRAPPER to fire it up. However, to best take advantage of this utility tie it to an ON KEY LABEL for instant access in the editor, and for the ability to immediately paste the text into the editor at the cursor position. Optionally you can export the text to the clipboard only.

NOTE: Since Wrapper uses the clipboard and pastes the text with Ctrl-V make sure that the Ctrl-V paste option is available on your menu. Without it Auto-paste will not work correctly.

You can optionally pre-determine the wrapper strings by passing a few parameters to the form:

    DO FORM WRAPPER WITH _ClipText,"loHTML.SendLn([","])"
    
The first parameter is the text that is displayed is to be wrapped while the second and third parameters identify the Start and End strings.


+++ Rick ---