LEdit VBX Component - LEVBX.VBX
Copyright (c) 1996 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.

***** 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.

***** 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.

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

***** 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.

***** 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
-----------------------

***** 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(Buffer: PChar): Word;
  This property gets the current line from the scanning position to the end
  of the line. See SetScan method for more details.

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

***** FirstVisibleLine  TYPE = Long
  Read only. This property returns the number of the first visible line
  in LEdit.

***** FirstVisiblePos  TYPE = Word
  Read only. This property returns the number of the first visible position
  within a line in LEdit.

***** 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 and LineLength properties to indicate
  line number.

***** 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.

property ModifyFlagNumber: TLEModifyFlag;
  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).

***** 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.

***** 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.

***** 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
  Design only. 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
  Design only. 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.

***** 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.

***** ExtraHorzSpacing  TYPE = 0 - 3
  Design only. 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.

***** HasFile  TYPE = Boolean
  Design only. 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
  Design only. 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
  Design only. 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
  0 - 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.

***** 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.

  Note: At run time you may switch between Direct and UseMemoryDC,
  but you can't switch between them and None.

***** 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
  Design only. 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

***** 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).

  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.

***** 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
  This property returns the version number of the LEdit DLL.

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

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.

***** Paint (DC 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
  ---------
  DC        - 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.

***** 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.

***** 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.

================================================================================
