LEdit VBX Component - LEVBX.VBX 
Copyright (c) 1996-1997 Andrey B. Yastrebov
Distributed by TechnoSoft, Inc.
Documentation file for LEdit VBX (LEdit Shareware Package)

Methods
-------

You know, VBX can't have custom method. Sometimes they're implemented
with Action propertiy. Here the implementation is slightly different.
Each method is a property of Integer type, that is read-only. To
invoke some method you need only to read this property. The Integer
value you receive indicates the result of the action. Zero means
successful action. Any other value means failure.


***** Clear
  This method will clear all the text from LEdit. If this is done, Undo is
  not possible.

***** ClearSelection
  This method will clear all selected text from LEdit.

***** CopyToClipboard
  This method will copy the selected text to the Windows clipboard.

***** CutToClipboard
  This method will clear the selected text and place a copy of it to
  the Windows clipboard.

***** DeleteSelection
  This method will clear all selected text from LEdit. It is identical to
  the ClearSelection property and was created to make it compatible with
  the OWL wrapper. The ClearSelection property was kept to keep
  it compatible with the Delphi VCL wrapper.

***** DrawPage
  Draws pice of LEdit text on the Windows Device Context specified by 
  PageDC property. Parameters of this operation are controlled with
  PageFirstLine, PageSkip, PageHeight, PageWidth, PageWordWrapWidth
  properties. See also NextPage.

***** Duplicate
  This property duplicates the currently selected block. This is equivalent
  to CopyToClipboard followed by PasteFromClipboard, so the clipboard is used.

***** EmptyUndoBuffer
  This method will clear the text from the Undo buffer.

***** Find
  This method will find the next word in a search. It repeats the last search
  performed. It returns 1 if the match was found.

***** FindBookmark
  This method will immediately jump to a bookmark that was set with the
  SetBookmark method.

***** FindBrace
  This method will find a match to the current brace. The OnFindBrace event
  determines what is considered a brace.

***** FindNext
  This method will find the next word in a search. It repeats the last search
  performed.

***** GetSelection
  This method will get the starting and ending character positions of the
  current selection. These positions are reflected in the StartLine, StartPos,
  EndLine, and EndPos properties.

***** GetCurrentWord;
  This method gets the word at the current cursor position. The Syntax property
  determines what is considered a word. The word information is placed into the
  WordText, WordCode and WordValue properties. See their description
  for details.

***** GetScan
  This method retrieves the position of last item received by the scanning
  methods. If last method called NewLine then it returns a pointer to the
  beginning of the line. The position is place into a the StartLine,
  StartPos, EndLine and EndPos properties.

***** GetWord
  This method gets the next word from the current reading position and moves
  the position pointer to the character after this word. The Syntax property
  determines what is considered a word. The word information is placed into the
  WordText, WordCode and WordValue properties. See their description for
  details. SkipLines property determines whether the scanning may cross
  line boundary.

***** LineLength
  This method returns the length of a line. LineNumber property specifies
  which line to return the length of.

***** NextLine
  This method moves the reading position used by GetWord to the start of next
  line.

***** NextPage
  Adjusts PageFirstLine and PageSkip properties so that they pointed to
  the next page. Requires all other Page... properties to be set, because
  it uses them all.

***** PasteFromClipboard
  This method will copy any text existing in the Windows clipboard into LEdit.

***** Print
  Prints contents of the control

***** PrinterSetup
  Calls Printer Setup dialog to set up the printer

***** QuietFind
  This method will find the next word in a search. It repeats the last search
  performed. It returns 1 if the match was found. Unlike Find it doesn't use
  current selection, but uses and modfifies StartPosition, EndPosition,
  StartLine and EndLine properties

***** Redo
  This method will redo the last undone action.  It is the opposite of Undo.

***** ReloadFile
  This method loads the current file into LEdit again. In effect it resets the
  file to the condition it was in the last time it was saved. The HasFile
  property must be set to True to use this method.

***** Replace
  This method compares current selection with SearchFindString and if they
  are the same, then replaces current selection with SearchReplaceString

***** ReplaceAll
  This methods replaces all occurences of SearchFindString with 
  SearchReplaceString.

***** SaveFile
  This method displays a save dialog and allows the user to set a file to
  save the text to within LEdit. It only displays the dialog if a filename
  has not been set. Then it saves the text to this file. If a filename has
  already been set then this method saves the text to that file without
  displaying the dialog. The HasFile property must be set to True to use this
  method.

***** SaveFileAs
  This method is similar to the SaveFile method except it displays the save
  dialog every time it is called. This allows you to save the file with a
  different name. The HasFile property must be set to True to use this method.

***** SaveToFile
  This method saves the text to file. File name should be set into
  FileNameToSave property. This operation doesn't need HasFile property
  to be set to True.

***** SelectAll
  This method sets all the text in LEdit to selected.

***** SetBookmark
  This method sets a bookmark in the LEdit text. The bookmark will be set to
  the current cursor location. When a bookmark is set, the FindBookmark method
  can be used to immediately jump to the bookmark.

***** SetScan
  This method moves the reading pointer to the top of the text and allows the
  GetWord and NextLine methods to operate. Any changes to the text or upon
  reaching the end of the file will disable the ability to use GetWord and
  NextLine. Therefore it is best to set the ReadOnly property to True while
  scanning the text.

***** SetSelection
  This method selects a range of characters. The values set in the StartLine,
  StartPos, EndLine and EndPos properties determine where the selection is
  made.

***** ShowFindDialog
  This method displays a Find dialog to allow you to search for text within
  LEdit.

***** ShowFontDialog
  This method displays a Font dialog to allow you to set the font in
  LEdit.

***** ShowGotoLineDialog
  This method displays a Goto Line dialog to allow you to go to a specific
  line number in LEdit.

***** ShowReplaceDialog;
  This method displays a Replace dialog to allow you to perform a search and
  replace in LEdit.

***** Undo
  This method undoes the last action. It is the opposite of Redo.

================================================================================

Runtime only properties
-----------------------

***** BookmarkAttr  TYPE = Integer
  Write only. Changes bookmark attributes. Only bookmark with number set into
  BookmarkNumber property is affected. The following values make sense:

  Value   Meaning
  -----------------------
  0       Bookmark won't be coloured
  1       Bookmark text will be coloured with color set via BookmarkForeColor
          Default is Yellow
  2       Bookmark background will be coloured with color set via
          BookmarkBackColor. Default is Red
  3       Both 1 and 2

***** BookmarkBackColor  TYPE = Color
  Specifies background color to be used to highlight bookmark. Only bookmark with
  number specified in BookmarkNumber property is affected.

***** BookmarkForeColor  TYPE = Color
  Specifies text color to be used to highlight bookmark. Only bookmark with
  number specified in BookmarkNumber property is affected.

***** BookmarkLine  TYPE = Long
  Sets or gets number of line that corresponds to the bookmark with number
  BookmarkNumber. Actually it sets or gets bookmark. As user edit text, number
  of line may change, so the number get trought this property may differ from
  the number set.

***** BookmarkNumber  TYPE = Integer (currently 0-15)
  Write only. Used by BookmarkLine, BookmarkAttr, BookmarkBackColor and
  BookmarkForeColor to manage Bookmarks

***** BurnHandle  TYPE = Integer
  Write only. This property allows you to pass a handle and it will free the
  memory associated with that handle. The primary purpose of this property is
  to provide an easy way to free global memory that is you allocate to store
  text in. It is basically a wrapper for the Windows API GlobalFree method.
  When you read the Text or SelText properties, global memory is allocated
  to hold the text. When you are finished using this text, you need to
  call the BurnHandle method and pass it the Handle returned from the Text
  or SelText property. It is very important to call this method before
  your program ends, if you read the Text or SelText property. If you
  don't, your program will develop a memory leak.


***** CanClose  TYPE = Boolean
  Read only. This property is set by LEdit and specifies whether the
  application can close or not. It returns True only if all the events allow
  it to close. See LEdit documentation for more details.

***** CanFindNext  TYPE = Boolean
  Read only. This property is set by LEdit and specifies whether the
  search word exists. If the search word exists, then this property will be
  set to True.

***** CanRedo  TYPE = Boolean
  Read only. This property is set by LEdit and specifies whether Redo
  is possible. If it is set to True then Redo is possible.

***** CanUndo  TYPE = Boolean
  Read only. This property is set by LEdit and specifies whether Undo
  is possible. If it is set to True then Undo is possible.

***** EndLine  TYPE = Long
  This property allows the end line to be set. This is used for all methods
  that use the EDITPOSITION record (such as SetSelection and GetSelection).
  See the GetScan property.

***** EndPos  TYPE = Long
  This property allows the end position within the end line to be set. This
  is used for all methods that use the EDITPOSITION record (such as
  SetSelection and GetSelection). See the GetScan property.

***** GetLine  TYPE = String
  This property gets the current line. LineNumber property should contain the
  number of the line to get.

***** GetRestOfLine  TYPE = String
  This property gets the current line from the scanning position to the end
  of the line. See SetScan method for more details.

***** GetWrapLine  TYPE = String
  This property returns the contents of one screenline. If WordWrap is False
  it is the same as regular line. LineNumber property should contain the
  number of the line, LineSkip should contain zero-based number of
  screenline within that line.

***** GetWrapLineCount  TYPE = Word
  This property returns the number of screenlines within a specified line.
  If WordWrap is False this is always 1. LineNumber property should contain 
  the number of the line.

***** GetWrapLineLength  TYPE = Word
  This property returns the length of one screenline. If WordWrap is False
  it is the same as regular line. LineNumber property should contain the
  number of the line, LineSkip should contain zero-based number of
  screenline within that line.

***** FileNameToSave  TYPE = String
  Write only. Stores file name. Makes sense only as supplier for
  SaveToFile method.

***** FirstVisibleLine  TYPE = Long
  This property returns the number of the first visible line in LEdit.
  May be also used to scroll LEdit's contents. See also Skip property.

***** FirstVisiblePos  TYPE = Word
  This property returns the number of the first visible position within 
  a line in LEdit. It may be used to scroll LEdit horizontally.

***** HighlightedLine TYPE = Long
  Read only. This property makes sense only within handler of 
  ControlHighlight event. It returns number of line with the word
  being highlighted.

***** HighlightedPos TYPE = Word
  Read only. This property makes sense only within handler of
  ControlHighlight event. It returns position of the word  being 
  highlighted inside a line.

***** IsLEdit  TYPE = Boolean
  Read only. This property determines whether the window is a LEdit window.
  Actually always true.

***** LineCount  TYPE = Long
  Read only. This property returns the total number of lines of text in
  LEdit.

***** LineNumber  TYPE = Long
  Write only. Used by GetLine, LineLength and other properties to indicate
  line number.

***** LineSkip  TYPE = Short
  Write only. Used by GetWrapLine and GetWrapLineLength to specify number
  of screenline within a line specified by LineNumber.

***** MenuPopUpHandle  TYPE = Integer
  Read only. This property returns a Handle to the popup menu in LEdit. This
  allows the popup menu to be modified.

***** Modified  TYPE = Boolean
  This property determines if the text in LEdit has been modified. LEdit will
  set it to True if text is modified. When you set this property, it will set
  the modified status of whichever modify flag number is set in the
  ModifyFlagNumber property.

***** ModifyFlagNumber TYPE = 0 - 15
  This property contains the number of the Modified flag currently being used
  by LEdit. It can contain values in the range of 0 to 15. This provides 16
  modified flags that can be used for nearly any purpose. Flags 0 and 1
  have special meaning (see LEdit documentation).

***** PageDC TYPE = Integer
  This property specifies Windows DC for DrawPage.

***** PageFirstLine TYPE = Long
  This property specifies first line to be drawn by DrawPage.

***** PageHeight TYPE = Word
  Specifies height of the picture drawn with DrawPage

***** PageSkip TYPE = Long
  This property specifies how many screenlines to skip after
  the beginning of PageFirstLine while doing DrawPage.

***** PageWidth TYPE = Word
  Specifies width of the picture drawn with DrawPage

***** PageWordWrapWidth = Word
  Specifies at which width wrap words while doing DrawPage

***** PrintedPageNum = Word
  Read only. Returns number of page being printed with Print
  or zero otherwise.

***** SearchDirection  TYPE = 0 - 2
  This property determines search direction.

  Value   Meaning
  -----------------------
  0       Search up
  1       Search down
  2       Search down and wrap over the end of the text

***** SearchFindString  TYPE = String
  This is the string used to make searhes and in Find/Replace dialogs

***** SearchMatchCase  TYPE = Boolean
  This property determines whether or not search is case-sensitive

***** SearchReplaceString  TYPE = String
  This is the string used to replace matches found

***** SearchWholeWords  TYPE = String
  This property determines whether search will find whole words or not.
  Word boundaries are determined according to Syntax property.

***** SelLength  TYPE = Long
  Read only. This property returns the number of characters in the selected
  text.

***** SelText  TYPE = Integer
  This property works exactly the same as the Text property described below,
  but works with any selected text instead of all the text. When you read
  this property, it allocates global memory, places a copy of any selected
  text into it, and returns a handle to the memory. This handle must be
  freed when you are finished with it by calling the BurnHandle method and
  passing it this Handle. You can also allocate your own memory and, place
  text into it, and then set this property to the Handle of the memory
  you created. This will replace any selected text in LEdit with your text.
  If no text is selected, then this text will be inserted at the cursor
  location. See the Text property and BurnHandle method for more information.

***** Skip TYPE = Word
  With word wrap one logical line may be represented by many screenlines.
  This property returns number of these screenlines belonging to the
  FirstVisibleLine but scrolled above screentop. Without word wrap this is
  always zero. May be used to scroll LEdit.

***** SkipLines  TYPE = Boolean
  Write only. Determines whether to cross line boundaries during execution
  of GetWord method.

***** StartLine  TYPE = Long
  This property allows the start line to be set. This is used for all methods
  that use the LEDITPOSITION record (such as SetSelection and GetSelection).
  See the GetScan property.

***** StartPos: Integer;
  This property allows the start position within the start line to be set.
  This is used for all methods that use the LEDITPOSITION record (such as
  SetSelection and GetSelection). See the GetScan property.

***** Text  TYPE = Integer
  When this property is read, it allocates a block of Global memory and places
  a copy of the text, in the LEdit control, into it. It then returns a Handle
  to the block of memory. When you access this block of memory, you should
  call the Windows API GlobalLock method first. This will return to you a
  pointer to the text which you can use however you wish. It is probably best
  to typecast the pointer to a PChar type when using it so it is type
  compatible with most other text handling methods. When you are finished
  with the text, you need to call the BurnHandle method and pass this handle
  to it. This will free the memory block allocated to the text. See the
  BurnHandle method for details. You can also allocate a block of memory
  youself and place text into it. Then set the Text property to the Handle
  of the block of memory you created. This will place a copy of the text, in
  the block of memory you created, into LEdit.

    Example (in VB)

    ' To have LEdit allocate a block of memory and place a copy of
    '  the text in LEdit into it

    H = LEditVBX1.Text 'Now H contains the handle of memory

    ' To place the text in an existing block of memory into LEdit. This
    ' specific example will place the text, from the H above, back
    ' into LEdit.

    LEditVBX2.Text = H       'Text is set to LEditVBX2
    LEditVBX1.BurnHandle = H 'Free the memory
                             'LEditVBX2.BurnHandle is equally
                             'appropriate here

***** TextLength  TYPE = Long
  Read only. This property returns the total number of characters in LEdit.

***** UndoMaxBuffer  TYPE = Integer
  Read only. This property returns the maximum size of the undo buffer
  (Undo level) that can be set.

***** UnitsHorizontal  TYPE = XSize
  Read only. This property returns the horizontal (maximum character width)
  scrolling units in twips.

***** UnitsVertical  TYPE = YSize
  Read only. This property returns the vertical (line height) scrolling units
  in twips.

***** WordCode  TYPE = Integer
  Read only. This property provides an interface to a WORDDESC structure.
  This property is used in all methods and properties that use a WORDDESC
  structure. See the GetCurrentWord and GetWord properties. It corresponds
  to the wCode field of WORDDESC structure (see LEdit documentation)

***** WordText  TYPE = String
  Read only. This property provides an interface to a WORDDESC structure.
  This property is used in all methods and properties that use a WORDDESC
  structure. See the GetCurrentWord and GetWord properties. It corresponds
  to the caWord field of WORDDESC structure (see LEdit documentation)

***** WordValue  TYPE = Long
  Read only. This property provides an interface to a WORDDESC structure.
  This property is used in all methods and properties that use a WORDDESC
  structure. See the GetCurrentWord and GetWord properties. It corresponds
  to the dwValue field of WORDDESC structure (see LEdit documentation)

================================================================================

Design-time properties
----------------------------------

***** About  TYPE = UserDefined
  Design only. This property displays an about box for the LEdit component.

***** AutoIndent  TYPE = Boolean
  This property turns on and off auto-indent. If it is set to True then
  auto-indent is turned on. The default is False.

***** BackColor  TYPE = Color
  This property sets the background color of text within LEdit.

***** BackColorSelected  TYPE = Color
  This property sets the background color of selected text within LEdit.

***** BookmarksMax TYPE = 1 - 256
  Gets or sets maximal number of bookmarks used with LEdit. The more this
  number is the slower LEdit works. The default is 16.

***** BorderStyle  TYPE = 0 - 1
  This property sets the style of the border around the LEdit component.
  The default is 0.

  These are the possible values:

  Value       Meaning
  ------------------------------------------
  0           No visible border
  1           Single-line border

***** CanChangeFile  TYPE = Boolean
  This property determines if the LEdit internal popup menu
  contains items that allow the user to open a new or existing file.
  If it is set to True then the popup menu will contain items to open
  a new or existing file. The HasFile property must be set to True.
  The default is False.

***** CanChangeFont  TYPE = Boolean
  This property determines if the LEdit internal popup menu
  contains items that allow the user to change the font. If it is set to
  True then the popup menu will contain items to change the font.
  The default is False.

***** CaretWidth TYPE = Word
  Specifies caret width. The default is 0.

***** CurrentWordAsText  TYPE = Boolean
  When set, all operations retrieving word from cursor position will receive
  word delimited with spaces, tab chars and line breaks. Otherwise the meaning
  of the word is determined by current syntax. The default is False.

***** DefaultSelection  TYPE = Boolean
  This property determines the behavior when a character key or the delete
  or backspace key is pressed and LEdit contains selected text. If
  DefaultSelection is set to True then it forces the selected text to be
  removed when a character key, the Delete key or the BackSpace key is
  pressed. This is the default Windows behaviuor. If DefaultSelection is
  set to False then only the last selected character is replaced or deleted
  when a character key, the Delete key or the BackSpace key is pressed.
  The default is False.

***** ExtraComments  TYPE = Boolean
  If True forces 6-th and 7-th elements of Syntax property to be treated
  as a comment signs in addition to 4-th and 5-th ones. The default is
  False.

***** ExtraHorzSpacing  TYPE = 0 - 3
  This property allows extra horizontal spacing to be set in
  LEdit. Sometimes it is difficult to see the cursor when it is right against
  the edge of the component. This allows you to set that edge to be indented
  a particular number of pixels. The default is 1.

  These are the possible values:

  Value          Meaning
  ----------------------------------
  0 - None       Not indented
  1 - Small      Indented 2 pixels
  2 - Medium     Indented 4 pixels
  3 - Large      Indented 6 pixels

***** ExtraVertSpacing  TYPE = 0 - 3
  This property allows extra vertical spacing to be set in LEdit. This is the
  amount of space between lines. The purpose of this is to allow better
  readability of some fonts. The default is 0.

  These are the possible values:

  Value          Meaning
  ----------------------------------
  0 - None       Not indented
  1 - Small      Indented 2 pixels
  2 - Medium     Indented 4 pixels
  3 - Large      Indented 6 pixels

***** FileMask  TYPE = String
  This property allows you to set the mask for the Open dialog. It can accept
  the mask only as the LEdit DLL requires. See the LEdit documentation for
  details.

***** FileName  TYPE = String
  This property allows the filename to be set for any file operations
  performed in LEdit. This property contains some special behaviors.
  While it is set, then file name may have special meaning:

    Empty string - LEdit should be cleared
    "+" - Open dialog should be shown that allow user to
          chose file. Unlike bare LEdit, if user click "Cancel"
          in this dialog, LEdit becomes cleared as if empty
          string was passed.

***** Font  TYPE = Font
  This property allows you to set the font and the font attributes
  in LEdit. Actually it is much container-specific.

***** ForeColor  TYPE = Color
  This property sets the foreground color of text within LEdit.

***** ForeColorSelected  TYPE = Color
  This property sets the foreground color of selected text within LEdit.

***** GroupNumber  TYPE = Integer
  Design only. Specifies number of group. Should be set to 0 if groups aren't
  used. If it isn't zero then all controls with the same GroupNumber are united
  in single group and share some attributes - currently Find/Replace dialogs
  and Insert/Overtype status. The default is 0.

***** HasFile  TYPE = Boolean
  This property determines whether LEdit stores file information
  internally or not. If it is set to True then LEdit automatically handles
  files. That is, it stores the filename, it can automatically load and save
  files and it checks whether the user saved the files or not. See the LEdit
  documentation for details. The default is False.

***** HasMenu  TYPE = 0 - 1
  This property allows the popup menu to be set. LEdit contains its own
  internal popup menu. The default is 0.

  These are the possible values:

  Value          Meaning
  ----------------------------------
  0 - None       No popup menu
  1 - PopUp      LEdit popup menu

***** Highlight  TYPE = Boolean
  This property causes the control to begin firing the
  ControlHighlight event. This allows it to determine which colors to use
  when drawing each word. The default is False.

***** InitializeType  TYPE = 0 - 1
  Design only. This property determines the way LEdit is initialized. It can
  be initialized with a File or any custom way you desire. If this is set
  to 1 - File, then the Filename property determines which file is loaded.
  See the FileName property for details. If 0 - Custom is set, then the
  TimeToLoadText event is fired upon startup to allow you to initialize
  it any way you wish. See TimeToLoadText event for details.
  The default is Custom.

  These are the possible values:

  Value          Meaning
  -------------------------------------------------------
  0 - Custom     Initialize in a custom designed manner
  1 - File       Initialize with a file

***** InsertMode  TYPE = Boolean
  This property turns on or off Insert mode in LEdit. If it is set to True
  then Insert mode is turned on. If it is set to False then Insert mode is
  turned off and Overwrite mode is turned on. The default is True.

***** Item2AsComment  TYPE = Boolean
  If TRUE forces LEdit treat 2-nd element of Syntax property as a comment
  not as a string. The default is False.

***** MacStyleSave  TYPE = Boolean
  If True LEdit uses CR as line breaks when it saves files. Otherwise it
  uses CR-LF pairs. The default is False.

***** MultilineItems  TYPE = Boolean
  True setting allow multiline comments and strings, otherwise they are
  recognized only when single-line. True setting slightly slows down editing
  speed. The default is False.

***** MultilineStrings  TYPE = Boolean
  Normally continuing string to the next line needs meta character at
  the end of it. True setting of this property forces strings to
  go past end of line regardless of it. The default is False.

***** NoPrintDialog  TYPE = Boolean
  Suppress Print dialog before printing when set to True. The default
  is False.

***** NoPrintProgress  TYPE = Boolean
  Suppress Print progress dialog when set to True. The default is False.

***** OwnerTag  TYPE = Long
  Reserved.

***** PaintMode  TYPE = 0 - 2
  This property is used to set the mode for painting on the background of
  LEdit. This allows custom backgrounds to be placed behind the text.
  The default is 0. See the Paint event for more details.

  These are the possible values:

  Value            Meaning
  -----------------------------------------------------------
  0 - None         LEdit paints its own background (Standard)
  1 - Direct       Allows you to paint directly to the LEdit
                   background.
  2 - UseMemoryDC  Allows you to paint to a bitmap in memory
                   and pass this memory bitmap to LEdit. LEdit
                   will then place the text over this bitmap.

***** ReadOnly  TYPE = Boolean
  The ReadOnly property determines if the user can change the contents of
  the control. If ReadOnly is True, the user can't change the contents. If
  ReadOnly is False, the user can modify the contents. The default is False.

***** ScrollBars  TYPE = 0 - 3
  This property allows you to turn on and off scroll bars
  on LEdit. The default is 0.

  These are the possible values:

  Value            Meaning
  ---------------------------------------------------------
  0 - None         No scroll bars are placed on LEdit
  1 - Horizontal   A horizontal scroll bar is placed on LEdit
  2 - Vertical     A vertical scroll bar is placed on LEdit
  3 - Both         Both vertical and horizontal scroll bars
                   are placed on LEdit

***** SinglelineStrings  TYPE = Boolean
  True setting of this property doesn't allow multiline strings even
  if MultilineItems is set to True. The default is False.

***** StartInComments  TYPE = Boolean
  If True LEdit is forced to think that this is open comment sign before
  the text. It makes sense only if MultilineItems property is set to TRUE.

***** Syntax  TYPE = String
  This property allows you to set the syntax that defines what a word is to
  LEdit. This can be used for many of the methods and properties in the LEdit
  component. This is the property that allows you to customize the behavior of
  the syntax analyzer for syntax color highlighting. The following explains how
  the syntax string must be set up.

  The syntax string is composed of several fields between 1 and 3 bytes each.
  Spaces, tabs and line breaks are considered natural delimiters. The problem
  with this, though, is that some expressions may be considered one word when
  they are in fact more than one word. For example, take the expression
  "wordA:=(wordB);". Using the natural delimiters, this would be considered
  as one word, when it is in fact more than one word. In this case, we would
  want the syntax analyzer to consider ':', '=', '(', and ')' as delimeters
  also. Given this, we actually have what we would consider three words:
  'wordA', 'wordB' and ';'. It is extremely important to consider what is a
  word and what is a delimiter. For example, the expression '(wordA = wordB);'
  is quite different than the above expression and would be defined differently.
  We want the above expression to be evaluated as if it were defined as
  "wordA : = ( wordB ) ;" using natural delimiters.

  The syntax property simply enumerates such words/delimiters like ':' or '('.
  If ':' is included in the syntax then 'wordA:' actually represents two words,
  'wordA' and ':'. If it is not included in the syntax, then it would be
  considered one word as 'wordA:'. This could be useful in mailers where we
  would want words such as 'Subject:' or 'From:' to be considered as one word.

  In Pascal, we have the delimiters ':' and '=', but also have ':=' which needs
  to be considered as a two character word consisting of the delimiters ':' and
  '='. So we must tell LEdit that ':=' is a separate word. In this case, the
  expression above would be split into 'wordA', ':=', '(', 'wordB', ')', and
  ';'. That is exactly what we need for Pascal syntax. So we end up with a list
  of syntax words ':', '=', '(', ')', and ':='. Each of them will be placed
  into one TSyntax structure. To have many of these, we will need an array of
  TSyntax structures. This is basically what the Syntax property provides. A
  combination of characters in the string will be used to fill an array of
  TSyntax structures. The string will need to be filled in the following manner.

  A value of 0 causes the syntax to be reset to the default.
  A value of 1 means that the next single character will be considered as a
    word or delimiter.
  A value of 2 means that the next two characters will be considered as a word.

  So to create the structure for our example above, we would make the string as
  '1:1=1(1)2:='. This signifies one character of ':', one character of '=', one
  character of '(', one character of ')' and two characters of ':='.

  In our Pascal example, we would also need to strip out comments. For example,
  'wordA{this is the first word} := (wordB){this is the second};' should be
  considered the same as our above example. The comments need to be omitted.
  To handle this, the first five fields in the Syntax string have a special
  meaning as follows:

  Field   Meaning
  -----   ----------------------------------------------------------------------
    1     Quote character. In Pascal this would be '. A second character also
          needs to be defined in this field as a magic character that represents
          a quote inside a string. In Pascal, this is also a single quote as '.
          So, if we are defining the string for Pascal, this field would consist
          of two quotes and would be defined as 2''.
    2     Alternative Quote character. This is the same as field 1 and defines
          an alternative quote character.
    3     Comment character. This defines a comment character. But it is
          different than field 4 below. This comment character defines a
          character where all text following it is considered a comment and is
          skipped. Any text following this character within the same line cannot
          be highlighted. This could be used for the C comment character '//'.
          If we are defining a string for C, this field would consist of '//'
          and would be defined as 2//.
    4     Starting (or Left) Comment Sign. This is the opening comment
          character. All text following this character up to the Ending Comment
          Sign character (field 5) is regarded as a comment and is skipped. It
          cannot be highlighted. So if we are defining the string for Pascal,
          this field would consist of { and would be defined as 1{.
    5     Ending (or Right) Comment Sign. This is the closing comment
          character. All text after the Starting Comment Sign (field 4) and
          before this character is considered a comment and cannot be
          highlighted. In our Pascal example, this field would consist of } and
          would be defined as 1}.

  These five fields must be the first five fields defined in the string. If you
  do not wish to define any of these five fields, then the value in that
  position must contain the value 0 (zero).

  So the complete Syntax string for our Pascal example would be defined as
  2''001{1}1:1=1(1)2:=  This would define ' as the quote character, no
  alternative quote character, no comment character, { as the starting comment
  sign, } as the ending comment sign, and :, =, (, ) and := as word delimiters.

  The Syntax for C++ would be defined as 2"\2'\2//2/*2*/1:1=1(1)2:= to signify
  "\ as the quote character, '\ as the alternate quote character, // as the
  comment character, /* as the starting comment sign, */ as the ending comment
  sign, and :, =, (, ) and := as word delimiters.

  Examples above surely don't show full syntax needed to Pascal or C++, only
  a small part of ...

  In some cases, the meaning of the delimiter can change depending upon where
  it lies in the word. For example, the word 'teleport.com' should not be
  treated as two separate words. We would want 'teleport.com' or '1.50' to be
  considered as one word, while 'end.' would be considered two words, 'end'
  and '.'. The period will be defined as a soft delimiter instead of a hard
  delimiter. To do this, you need to include '2. ' (two, point, space) in the
  Syntax string. To define the period as a hard delimiter, you would define it
  as '1.' (one, point).

  Since V2.00 there may be two additional meanings. '3' means that past it
  there will be a symbol that starts new words. For example if you specify
  '3$' the line 'one$two' will be parsed into 'one' and '$two'. '4' means
  that past it goes a symbol that ends words. For example giving '4$', you
  specifies that 'one$two' should be parsed as 'one$' and 'two'. Note that
  this differ from standard '1$' which will break 'one$two' into three
  items - 'one','$' and 'two'.

  The maximum number of syntax items is 254 characters. See the EM_SETSYNTAX
  message in the LEdit documentation for more information. Keep in mind that
  the component is a string value and the LEdit documentation describes the
  syntax as a string. This string is actually parsed and sent to the LEdit
  DLL in the format described in the LEdit documentation.

***** TabStop  TYPE = Boolean
  Design only. The TabStop property determines if the user can tab to a
  control. If TabStop is True, the control is in the tab order. If TabStop
  is False, the control is not in the tab order; therefore, the user can't
  press the Tab key to move to the control. If it is true, pressing Tab key
  while LEdit has focus will move focus to the next control. Otherwise,
  tab character is inserted into the editing text. The default is True.

***** TabStopSize  TYPE = 1 - 40
  This property allows you to set the size of tab stops in character units.
  It can be within the range of 1 to 40. The default is 1.

***** UnixStyleSave  TYPE = Boolean
  If True LEdit uses LF as line breaks when it saves files. Otherwise it
  uses CR-LF pairs. The default is False.

***** UndoDepth  TYPE = Integer
  This property allows you to set the number of Undo levels within LEdit.
  This is the number of actions that can be undone. Each time the Undo
  method is called, it will undo the next action in the list of undo
  actions. If this property is set to -1 then it sets the undo depth to
  the maximum number of undo buffers allowed, as determined by the
  UndoMaxBuffer property. See the UndoMaxBuffer runtime property.
  The default is -1.

***** Version  TYPE = Integer
  Read only. This property returns the version number of the LEdit DLL.

***** WordWrap  TYPE = Boolean
  True setting forces lines to be wrapped at right margin. The default
  is False.

***** WordWrapAuto  TYPE = Boolean
  True setting forces LEdit break lines at spaces instead of firing
  WordBreak event. The default is True.

***** WordWrapRMargin  TYPE = 0 - 15
  Specifies right margin used with word wrap if WordWrapWidth = 0.
  The default is 0.

***** WordWrapWidth  TYPE = Word
  Specifies width of the band text is restricted horizontally when
  WordWrap is True. Zero value means that the width is automatically
  adjusted to control width minus WordWrapRMargin. The default is 0.

***** WrapKeys  TYPE = Boolean
  If set to true forces Left/Right and Ctrl+Left/Right keys to wrap
  around lines

================================================================================

Events
------

***** AskIfStoreFile (Response As Integer)
  This event is fired when an unsaved file is about to be closed. It is
  always preceded by the GoingToClose event.

***** Change
  This event is fired not only when the text is changed but also when
  the caret position is changed. This is done to faciliate status line
  management if you want to track the position of the caret.

***** ChangeMode
  This event is fired when the Insert/Overwrite mode is changed.

***** ClipboardError
  This event is fired when a Clipboard error occurs during an attempt to
  place or read text to or from the clipboard.

***** ControlHighlight (WordCode As Integer,
                        WordValue As Long,
                        WordText As String,
                        BkColor As Long,
                        TextColor As Long
                        Response As Integer)
  This event is fired when the Highlight property is set to True. LEdit
  fires this event for each word in the control. This allows the color of
  each word to be set to allow highlighting.

  The following values are passed to this event:

  Read Only
  ---------
  WordCode           - This contains the type of the Word. See the LEdit
                       documentation for details.
  WordValue          - This contains the numeric value of the word as
                       defined by the WordCode variable.
  WordText           - This contains the string value of the current word.

  Write Only
  ----------
  TextColor       - This variable should be set to whatever foreground
                    color you want the particular word returned in the
                    WordCode, WordValue and WordText variables.
  BkColor         - This is the same as the TextColor but is used to set the
                    background color of the word.

  Response        - 0 - Don't highlight the word
                  - 1 - Use only BkColor
                  - 2 - Use only TextColor
                  - 3 - Use both colors

***** FileError
  This event is fired when an error occurs during any file operations that
  LEdit performs.

***** FindBrace (WordCode As Integer,
                 WordValue As Long,
                 WordText As String,
                 Response As Integer)
  This event is fired when LEdit tries to determine where a brace is
  for syntax highlighting. The application should not change the text
  in LEdit from within this event. In the case where words are
  considered braces (eg., "begin", "end"), you need to tell LEdit if it
  has an opposite brace or not and if it does, what the opposite brace
  is. To do this, you place the opposite brace into caWord of the
  WordDesc property. See the LEdit example 'ledit_4' to see how this
  is done.

  The following values are passed to this event:

  Read and Write
  --------------
  WordCode           - This contains the type of the Word. See LEdit
                       documentation.
  WordValue          - This contains the numeric value of the word as
                       defined by the WordCode variable.
  WordText           - This contains the current word.

  Write Only
  ----------
  Response     - You need to set this variable with the type of
                 brace the word is. Other fields must be filled
                 in with word supposed to be brace of that word

  Response should be set to one of the following to specify what type of
  brace the word is:

  Response should be set to one of the following to specify that the
  brace has an opposite brace of this type:

  Value                 Meaning
  -------------------------------------------------
  0                   The word has no opposite brace.
  1                   The word has a left brace.
  2                   The word has a right brace.
  5                   The word has a left brace
                        (case insensitive search).
  6                   The word has a right brace
                        (case insensitive search).

***** GoingToClose
  This event is fired when LEdit is ready to close. If the file in the
  control was not saved, this will be followed by an AskIfStoreFile
  event. This event is fired when LEdit is ready to close. It is also
  fired any time a new file is started or opened.

***** GotFocus
  This event is fired when the LEdit component receives focus.

***** HorzScroll
  This event is fired when LEdit is scrolled horizontally.

***** LostFocus
  This event is fired when the LEdit component loses focus.

***** MaxLine
  This event is fired when a user action generates a string greater
  than 8K (current limitation per line). If a string longer than 8K
  is loaded from a file or inserted from the clipboard, this event is
  not fired. Instead, the string is automatically split without
  notification.

***** NewFile
  This event is fired when LEdit creates a new file.

***** NewFont
  This event is fired when the font is changed.

***** NotifyFound (Code As Long, 
                   Response As Integer)
  This event is fired when LEdit is about to show "Matches not
  found" or "X entries replaced" dialogs. 

  Read Only
  ---------
  Code               - -1    "Matches not found" for braces
                       0     "Matches not found" for Find
                       X     "X entries replaced"

  Write Only
  ----------
  Response           - Set it to 1 to prevent LEdit of firing
                       the dialog

***** Paint (hDC As Integer)
  This event is fired when the PaintMode property is set to Direct or
  UseMemoryDC and LEdit is ready to paint the background. This allows
  you to draw a special background.

  The following values are passed to this event:

  Read Only
  ---------
  hDC       - This contains the Handle to the device context that can
              be drawn on. If the PaintMode property is set to
              Direct, then this will contain the handle to the device
              context that allows you to draw directly on the LEdit
              background. If the PaintMode property is set to
              UseMemoryDC then this will contain a handle to a
              memory device context that can be drawn on. This memory
              device context is then passed to LEdit. LEdit will then
              draw the text on this memory device context before it
              displays it. This allows flicker free drawing of the
              background, at the expense of speed.

***** PrintPage (hDC as Integer, 
                 Width as Integer, 
                 Height as Integer, 
                 Header as Integer, 
                 Footer as Integer)
  
  This event is fired each time LEdit draws a page with Print "method".
  This method is used to participate by drawing footer and header. This
  should be done with Windows Device Context hDC with calls to Windows
  API. It's handy to use PrintedPageNum property with this event

  Read Only
  ---------
  hDC       - This is identifier of Windows DC to draw on. You cannot
              change its settings
  Width     - Width of the printed page.
  Height    - Height of the printed page.

  Write Only
  ----------
  Header    - This field must be filled with a height of header drawn
  Footer    - This field must be filled with a height of footer drawn

***** SpaceError
  This event is fired when a memory error occurs.

***** TimeToLoadText
  This event is fired at initialization, when the Initialize property is
  set to Custom. This is to allow you to customize the way LEdit is
  initialized. See the Initialize property for details.

***** VertScroll
  This event is fired when LEdit is scrolled vertically.

***** WordBreak (Line as String, 
                 BreakPoint as Integer)
  This event is fired if WordWrap is set to True while WordWrapAuto
  is set to False and is designed to tell LEdit how to break the
  Line

  The following values are passed to this event:

  Read Only
  ---------
  Line               - String containing a line to break. To improve
                       performance Line is truncated one position 
                       after BreakPoint.

  Read and Write
  --------------
  BreakPoint         - The maximum position at which line may be broken
                       to fit word break requirement. This has to be replaced
                       by the same or lesser value to indicate point where
                       the line has to be broken.

***** WordClick (WordCode As Integer,
                 WordValue As Long,
                 WordText As String,
                 Response As Integer)
  This event is fired when a word is double clicked in LEdit.

  The following values are passed to this event:

  Read Only
  ---------
  WordCode     - This contains the type of the Word. See LEdit
                 documentation.
  WordValue    - This contains the numeric value of the word as
                 defined by the WordCode variable.
  WordText     - This contains the current word.

  Write Only
  --------------
  Response  - This contains the status on whether this word
              was handled in this event. If it is not handled
              in this event, then you need to set this variable
              to 0. This is the default and LEdit will
              highlight the word clicked by default. If you
              handle the word in this event, then you need to
              set this variable to 1. This way LEdit will
              not handle it. This can be used for spell checking
              and other uses where you need to handle a word
              that is double clicked on.

================================================================================
