TLEdit Delphi Component
Copyright 1996, TechnoSoft, Inc.
Documentation text file for Delphi VCL


The components are now split into two separate units. LEDLP.DCU (LEDLP32.DCU in 
32-bit VCL) contains TCustomLEdit and TLEdit. LEDLD.DCU (LEDLD32.DCU in 32-bit VCL) 
contains TDBLEdit which is the data aware version of LEdit. All properties, methods
and events that use Strings use Delphi 2 long strings in the 32-bit version.

================================================================================
                       TDBLEdit Component Only
================================================================================

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

property Field: TField;
  Data Aware component (TDBLEDIT) only. Read only. This property allows you read 
  the database field. It works the same as the standard Field property defined 
  in other Data Aware controls. See the standard Delphi help for a description 
  of this property.

Published properties - design time
----------------------------------

property AutoDisplay: Boolean;
  This property works exactly the same as the AutoDisplay property in the
  standard Data Aware TMemo component. Default is True.

property DataField: string;
  Data Aware component (TDBLEDIT) only. This property allows DBLEdit to be 
  connected to a Field in a database. See the standard Delphi help for a 
  description of this property.

property DataSource: TDataSource;
  Data Aware component (TDBLEDIT) only. This property allows DBLEdit to be 
  connected to a DataSource component. See the standard Delphi help for a 
  description of this property.

property ReadOnly: Boolean;
  This property functions exactly like the ReadOnly property of the standard
  data aware TMemo component. See the standard Delphi help for for data 
  aware TMemo for a description of how this property works. Default is False.

================================================================================
                        All LEdit Components
================================================================================

Property types
--------------

TLEScrollStyle  = (lsNone, lsHorizontal, lsVertical, lsBoth);
  This type defines the types of scroll bars that can be added to the LEdit 
  component.

TLEPopupStyle   = (psNone, psStandard, psDelphi);
  This type defines the types of popup menu allowed in the LEdit component.

TLEInitStyle    = (isFile, isCustom);
  This type defines the ways the LEdit component can be initialized.

TLESpaceStyle   = (slNone, slSmall, slMedium, slLarge);
  This type defines the types of horizontal and vertical indentation allowed
  with the LEdit component.

TLEBraceStyle   = (brNone, brLeftBrace, brRightBrace, brNoCaseLeftBrace, 
                   brNoCaseRightBrace);
  This type defines allowed responses to the FindBrace event.

TLEPaintStyle   = (dsNone, dsDirect, dsUseMemoryDC);
  This type defines the types of painting allowed in the LEdit component.

TLEBookmarkStyle = (bmInActive, bmForeColor, bmBackColor, bmFullColor);
  This type defines the types of Bookmark settings allowed in the
  BookmarkAttr property.

TLESearchDir = (sdUp, sdDown, sdDownWithWrap);
  This type defines the types of Search Direction settings allowed in the
  SearchDirection property.

TLEDialogStyle = (dsFindReplace, dsOpenSave, dsPrint, dsPrinterSetup, 
                  dsPrintProgress, dsFont, dsGotoLine);
  This type defines the types of Dialogs allowed in the DialogType property.

TLETranslateStyle = (tsToLeft, tsNearest);
  This type defines the way the TranslateLocation method works.

TLEModifyFlag   = 0..15;
  This defines the range of valid values for the ModifyFlagNumber property.

TLETabStopSize  = 1..40;
  This defines the range of valid values for the TabStopSize property.

TLEBookmarkNum = 0..255;
  This defines the range of valid values for the BookmarkNumber property.
  Changed the range to 255 to accomodate the max number of bookmarks.

TLEBookmarksMax = 1..256;
  This defines the range of valid values for the BookmarksMax property

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

Event types
-----------

TCHEvent = procedure(Sender: TObject; WordType: Word; WordValue: LongInt; 
              WordStr: String; var ForeClr, BackClr: TColor) of object;
  This is the event definition for the OnControlHighlight event.

TNotifyFoundEvent = procedure(Sender: TObject; Code: Integer; 
              var Response: Integer) of object;
  This is the event definition for the OnNotifyFound event.

TPaintEvent = procedure(Sender: TObject; DCHandle: HDC; 
              ClientArea: TRect) of object;
  This is the event definition for the OnPaint event.

TPrintEvent = procedure(Sender: TObject; PrintDC: HDC; 
                 VerticalSize, HorizontalSize: Word;
                 var HeaderSize, FooterSize: Word) of object;
  This is the event definition for the OnPrintPage event.

TFBEvent = procedure(Sender: TObject; WordType: Word; WordValue: LongInt;
              WordStr: String; var BraceType: TLEBraceStyle) of object;
  This is the event definition for the OnFindBrace event.

TReadPreviewEvent = procedure(Sender: TObject; BufLen: Integer; 
              var Buffer: PChar) of object;
  This is the event definition for the OnReadPreview event.

TWordClickEvent = procedure(Sender: TObject; WordType: Word; WordValue: LongInt;
              WordStr: String; var WordHandled: Boolean) of object;
  This is the event definition for the OnWordClick event.

TWordWrapEvent = procedure(Sender: TObject; Line: PChar; 
              var Position: SmallInt) of object;
  This is the event definition for the OnWordBreak event.

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

Methods
-------

procedure AddStr(AStr: String);
  This method allows you to pass a Pascal style string and it will be added
  to the end of the text. The cursor will be set to the beginning of the
  text that is added. The LFocus property determines if Focus is set to the 
  LEdit control after this procedure is complete.

procedure BurnHandle(BHandle: Word);
  This method allows you to pass a handle and it will free the memory 
  associated with that handle. The primary purpose of this method 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 propertys, 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.

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

procedure ClearSelection;
  This method will clear all selected text from LEdit.

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

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

procedure DeleteLine(LineNumber: LongInt);
  This method will delete the line passed in LineNumber.

procedure 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 VBX and OWL packages. The ClearSelection property was kept to keep
  it compatible with the Delphi TMemo component.

procedure DrawPage(DrawDC: HDC);
  This method causes LEdit to draw its text on any Device Context (DC). The
  DC must be created and the handle to the DC is passed to the method. The
  PageHeight, PageWidth, PageWordWrapWidth, PageFirstLine and PageSkip
  properties must be set before this method is called. For details, see the
  description for the EM_DRAWPAGE message in the LEDIT.INC or LEDIT.H files.

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

procedure EmptyUndoBuffer;
  This method will clear the text from the Undo buffer.

function Find(FindText: String): Word;
  This method searches for FindText within LEdit and highlights it if it is
  found. This allows a search to be performed without using the built-in search
  dialog. This stops when it finds the next occurance of FindText.

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

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

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

function GetCurrentWord: Word;
  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
  WordDesc property. See the WordDesc property for details.

function GetLine(Buffer: PChar; LineNumber: LongInt): Word;
  This method gets the current line and places it into Buffer. Buffer must
  be large enough to hold an entire line (8K) of text. LineNumber is the
  number of the line to get. It returns the number or characters placed into
  Buffer.

function GetLineStr(LineNumber: LongInt): String;
  This method gets the line at LineNumber and returns up to 255 characters
  of it as a Pascal style string. If the line is blank, it will return a
  null string. In the 32-bit version, this will return the entire line as a long string.

function GetRestOfLine(Buffer: PChar): Word;
  This method gets the line from the scanning position to the end of the
  line and places it into Buffer. Buffer must be large enough to hold all
  the text. It returns the number of characters placed into Buffer. It
  doesn't move scrolling position.

function GetScan: Word;
  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.

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

function GetStr: String;
  This method gets the current line, from the cursor position to the end
  of the line, and returns up to 255 characters of it as a Pascal style 
  string. If some text is selected, then this will get the selected text
  and return it (up to 255 characters). If the line is blank, it will return
  a null string. In the 32-bit version, 255 character limit does not
  exist. It will return as much text as necessary in a long string.

function GetWord(SkipLines: Boolean): Word;
  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
  WordDesc property. See the WordDesc property for details.

function GetWrapLine(LineNumber: LongInt; SkipVal: Word): String;
  When word wrap is turned on, LEdit represents one physical line of
  text with several logical lines on the screen. This function 
  retrieves one logical screen line and returns it as a Pascal string.
  It takes the physical line number and the skip value for parameters. 
  See the Skip property for details on the skip value.

function GetWrapLineLength(LineNumber: LongInt; SkipVal: Word): Word;
  This function returns the length of a logical screen line. It takes
  the physical line number and skip value for parameters. See the Skip 
  property for details on the skip value.

function GetWrapCount(LineNumber: LongInt): Word;
  This function returns the number of logical screen lines that the
  physical line consists of. It takes the physical line number for
  a parameter.

procedure GotoBookmark(BmNum: Word);
  This method will jump to the bookmark number BmNum. This must be a valid
  bookmark and must be in the range of 0 to 255.

procedure InsertStr(IStr: String);
  This method will insert a Pascal style string at the current cursor location.
  If some text is selected, it will replace the selected text with the string.
  The LFocus property determines if Focus is set to the LEdit control after 
  this procedure is complete.

procedure InsertStrPos(LineNumber: LongInt; PosNumber: Integer; IStr: String);
  This method will insert a Pascal style string at the line LineNumber and at
  the PosNumber position within that line.  The LFocus property determines if 
  Focus is set to the LEdit control after this procedure is complete.

function LineLength(LineNumber: LongInt): Word;
  This method returns the length of a line.  LineNumber specifies which line
  to return the length of.

function LoadFromFile(Filename: String): Word;
  This method loads the file specified in Filename into LEdit.

procedure LoadFromStream(Stream: TStream);
  This method allows you to load LEdit from a Stream. It works best with a
  memory stream, but will work with any stream.

function NextLine: Word;
  This method moves the reading position used by GetWord to the start of next
  line.

procedure NextPage(DrawDC: HDC);
  This method sets the values of the PageFirstLine and PageSkip properties to
  point to the next page to be drawn on. If the Page properties point to the 
  last page, then PageFirstLine is set to 0. The Device Context (DC) must be
  passed to this method. The DC must contain the proper font for drawing. For 
  details, see the description for the EM_NEXTPAGE message in the LEDIT.INC 
  or LEDIT.H files.

procedure NewFile;
  This method clears LEdit and begins a new file. It is equivilent to the
  New menu item in most Windows programs. it creates an <<untitled>> file.
  The HasFile property must be set to True to use this method.

procedure OpenFile;
  This method displays an open dialog and allows the user to select a file
  to load into LEdit or to specify a new filename to create a new file. The
  HasFile property must be set to True to use this method.

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

procedure Print;
  This method will display a print dialog if the NoPrintDialog property is set
  to False and then print the contents of LEdit. If the NoPrintDialog property
  is set to True, then this method will just print to the default printer
  without displaying the print dialog. A print progress dialog will also be
  displayed if the NoPrintProgress property is set to False or it will not
  be displayed if the NoPrintProgress property is set to True.

procedure PrinterSetup;
  This method will display a print setup dialog to allow the printer settings
  to be set.

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

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

function Replace(FindText: String; ReplaceText: String): Word;
  This method searches for FindText within LEdit and replaces it with ReplaceText
  if it is found. This allows a search and replace to be performed without using
  the built-in search and replace dialog. This only replaces the next occurance
  of FindText found.

function ReplaceAll(FindText: String; ReplaceText: String): LongInt;
  This method searches for FindText within LEdit and replaces it with ReplaceText
  if it is found. This allows a search and replace to be performed without using
  the built-in search and replace dialog. This is the same as Replace, except it
  replaces all occurances of FindText.

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

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

function SaveToFile(Filename: String): Word;
  This method saves the text in LEdit to the file specified in Filename.

procedure SaveToStream(Stream: TStream);
  This method allows you to save LEdit to a Stream. It works best with a
  memory stream, but will work with any stream.

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

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

procedure SetBookmarkNum(BmNum: Word);
  This method sets a bookmark in the LEdit text. The bookmark will be set to
  the current cursor location. It will set the bookmark to bookmark number 
  BmNum. You can use GotoBookmark to return to this bookmark.

procedure SetDialogPosition(X, Y: SmallInt; DT: TLEDialogStyle);
  This method allows you to set the position that any of the LEdit built-in
  dialogs are displayed. It will set the dialog specified by DT to the 
  horizontal screen position specified in X and the vertical screen position
  specified in Y. The dialogs that can be set in the DT parameter are 
  Find/Replace (dsFindReplace), Open/Save (dsOpenSave), Print (dsPrint), 
  Printer Setup (dsPrinterSetup), Print Progress (dsPrintProgress), 
  Font (dsFont), and Goto Line (dsGotoLine).

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

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

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

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

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

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

procedure TranslateLocation(X,Y: Word; var Line: LongInt; var Pos: Word;
                           Operation: TLETranslateStyle);
  This function translates the pixel coordinates specified in X (horizontal) and 
  Y (vertical) into an LEdit line number and position in that line. The Operation
  paramter determines how this translation is made. Operation can be set to 
  tsToLeft or tsNearest. tsToLeft will return the nearest horizontal position
  to the left of the specified point. tsNearest will return the nearest horizontal
  position looking at both sides of the specified point. The line and position are
  returned in the Line and Pos parameters. When calling this function, any values
  can be passed into the function in the Line and Pos parameters. The function 
  only uses these parameters to return the line and position.

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

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

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

property BookmarkAttr: TLEBookmarkStyle;
  Changes bookmark attributes. Only the bookmark with its number set into
  the BookmarkNumber property is affected. The following are the valid
  settings:

  Value   Meaning
  ---------------------------------------------------------------------
  bmInactive   Bookmark will not be colored
  bmForeColor  Bookmark text will be colored with the color set in
               the BookmarkForeColor property. Default is Yellow
  bmBackColor  Bookmark background will be colored with the color set in
               the BookmarkBackColor property. Default is Red
  bmFullColor  Both bmForeColor and bmBackColor

property BookmarkBackColor: TColor;
  Specifies the background color to be used to highlight a bookmark. Only 
  the bookmark with its number specified in the BookmarkNumber property is
  affected.

property BookmarkForeColor: TColor;
  Specifies the text color to be used to highlight a bookmark. Only the
  bookmark with its number specified in the BookmarkNumber property is 
  affected.

property BookmarkLine: LongInt;
  Sets or gets the number of the line that corresponds to the bookmark 
  with its number set in the BookmarkNumber property. Actually it sets 
  or gets the bookmark. As the user edits the text, the line number
  may change, so the number returned by this property may differ from
  the number set.

property BookmarkNumber: TLEBookmarkNum;
  Used by BookmarkLine, BookmarkAttr, BookmarkBackColor and 
  BookmarkForeColor to determine the bookmark number to be used.

property CanClose: 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.

property CanFindNext: 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.

property CanRedo: 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.

property CanUndo: 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.

property HighlightedLine: LongInt;
  Read only. When read from the OnControlHighlight event, it returns the number 
  of the line that contains the word being highlighted. It only works if
  the Highlight property is set to True.

property HighlightedPos: LongInt;
  Read only. When read from the OnControlHighlight event, it returns an offset 
  of the word being highlighted relative to the beginning of the line. It only 
  works if the Highlight property is set to True.

property IsLEdit: Boolean;
  Read only. This property determines whether the window is a LEdit window.

property LFocus: Boolean;
  This property is used by the AddStr, InsertStr, and InsertStr methods to
  determine if focus should be set to the LEdit control after the methods
  are complete. The default is True.

property LineCount: LongInt;
  Read only. This property returns the total number of lines of text in
  LEdit.

property MenuPopUpHandle: Word;
  Read only. This property returns a Handle to the popup menu in LEdit. This
  allows the popup menu to be modified.

property Modified: 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 number 0
  and 1 have special meaning. See LEdit documentation.

property MsgResult: LongInt;
  This property allows you to specify the return result in the events. This
  property should be set from within each event that is used. The following
  are the valid values:

  Value                Meaning
  ---------------------------------------------------------------------
  cmd_DoItYourself     LEdit should handle the action itself.
  cmd_ReplyYes         It is Ok for LEdit to perform the action.
  cmd_ReplyOK          Same as cmd_ReplyYes.
  cmd_ReplyNo          LEdit should not perform the action.
  cmd_ReplyCancel      LEdit should Cancel the action.

property PageFirstLine: LongInt;
  This property holds the number of the first line to be drawn. It corresponds 
  to the dwFirstLine field of the TDrawPage record structure and is used by the 
  DrawPage and NextPage methods.

property PageHeight: Word;
  This property holds the height of the page to be drawn to. It corresponds to
  the wHeight field of the TDrawPage record structure and is used by the
  DrawPage and NextPage methods.

property PageSkip: Word;
  This property holds the number of logical screen lines to skip before 
  drawing. This makes sense only with word wrap, where one physical line may 
  be represented as many logical screen lines. Some of them may have been 
  already drawn on previous pages and this page should start only after 
  PageSkip. These lines are skipped from the beginning of PageFirstLine. It 
  corresponds to the wSkip field of the TDrawPage record structure and is 
  used by the DrawPage and NextPage methods.

property PageWidth: Word;
  This property holds the width of the page. It corresponds to the wWidth field 
  of the TDrawPage record structure and is used by the DrawPage and NextPage 
  methods.

property PageWordWrapWidth: Word;
  This property holds the maximum width at which word wrap occurs. If zero then 
  words are clipped at right margin (wWidth). It corresponds to the 
  wWordWrapWidth field of the TDrawPage record structure and is used by the 
  DrawPage and NextPage methods.

property PrintedPageNum: LongInt;
  Read only. This property returns the page number being printed if LEdit is 
  printing something. Otherwise it returns 0.

property SearchReplaceString: String;
  Read only. This property returns the text that will be used as the 
  replacement text in a search/replace operation.

property SearchFindText: String;
  Read only. This property returns the text that will be used as the 
  search text in a search or search/replace operation.

property SearchDirection: TLESearchDir;
  This property contains the search setting for the direction that a 
  search or search/replace operation will search for the text. The 
  default is sdDown. The following are the valid settings:

  Value           Meaning
  ---------------------------------------------------
  sdUp            Search operation will search up.
  sdDown          Search operation will search down.
  sdDownWithWrap  Search operation will search down 
                  and will wrap to the top when it 
                  reaches the bottom of the file.

property SearchWholeWords: Boolean;
  This property contains the search setting to determine if the search
  will only search for whole words or not. If this is set to True, then 
  the search operation will only stop on a word if it is a whole word 
  and matches the text being searched for. If it is set to False, then
  the search operation will also find the text if it is contained within
  a word. The default is False.

property SearchMatchCase: Boolean;
  This property contains the search setting to determine if the search
  will only search for words that match the text exactly (case sensitive).
  If it is set to True, then the search is case sensitive. If it is set to
  False, then the search fill find text without regard to case. The default
  is False.

property SelLength: LongInt;
  Read only. This property returns the number of characters in the selected
  text.

property SelText: THandle;   (16-bit version)
property SelText: String;    (32-bit version)
  This property works exactly the same as the Text property described below,
  but works with any selected text instead of all the text. 
  (16-bit version): 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. This property is not compatible with the 32-bit version. 
  (32-bit version): This property uses the Delphi 2.0 long strings which will 
  allow it to hold all the text in the LEdit control. You can also place text 
  into this property by assigning any Delphi 2.0 long string to it. 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
  for more information.

property SelTextHandle: THandle;
  This property works exactly the same as the SelText property. It is provided
  for compatiblity with the 32-bit version. If you are planning on upgrading
  to the 32-bit version, it is best to use this property because the SelText
  property in the 32-bit version is a Delphi 2.0 long string.

property Text: THandle;   (16-bit version)
  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. This property is not compatible 
  with the 32-bit version. The 32-bit version is a Delphi 2.0 long string.
  For more info on the 32-bit version of this property, see the Text property 
  under the 'Published properties - design time' section below.

    Example:

    var
      MemoryHandle: THandle;

    { To have LEdit allocate a block of memory and place a copy of
      the text in LEdit into it }
    procedure TForm1.Button3Click(Sender: TObject);
    var
      MemoryPointer: Pointer;
      MemoryPChar: PChar;
      Len: LongInt;
    begin
      MemoryHandle := LEdit1.Text;
      Len := LEdit1.TextLength;
      if Len > 0 then
      begin
        MemoryPointer := GlobalLock(MemoryHandle);
        if MemoryPointer = nil then
          GlobalFree(MemoryHandle)
        else
        begin
          MemoryPChar := PChar(MemoryPointer);
          { Do what you want with the PChar that is pointing to the text }
          GlobalUnlock(MemoryHandle);
        end;
      end;
    end;

    { To place the text in an existing block of memory into LEdit. This
      specific example will place the text, from the above example, back
      into LEdit. }
    procedure TForm1.Button4Click(Sender: TObject);
    var
      MemoryPointer: Pointer;
    begin
      MemoryPointer := GlobalLock(MemoryHandle);
      if MemoryPointer = nil then
        GlobalFree(MemoryHandle)
      else
      begin
        LEdit.Text := MemoryHandle;
        GlobalUnlock(MemoryHandle);
        BurnHandle(MemoryHandle);
      end;
    end;

property TextHandle: THandle;
  This property works exactly the same as the Text property in the 16-bit
  version. It is provided for compatiblity with the 32-bit version. If you 
  are also using the 32-bit version, it is best to use this property because 
  the Text property in the 32-bit version is a Delphi 2.0 long string. In the
  32-bit version, this property works exactly like the 16-bit Text property
  described above.

property TextLength: LongInt;
  Read only. This property returns the total number of characters in LEdit.

property UndoMaxBuffer: Word;
  Read only. This property returns the maximum size of the undo buffer
  (Undo level) that can be set.

property UnitsHorizontal: Word;
  Read only. This property returns the horizontal (maximum character width) 
  scrolling units in pixels.

property UnitsVertical: Word;
  Read only. This property returns the vertical (line height) scrolling units
  in pixels.

property WordDesc: TWordDesc;
  Read only. This property provides an interface to a TWordDesc record.
  This property is used in all methods and properties that use a TWordDesc
  record. See LEDIT.INC for a description of the TWordDesc structure. See the
  GetCurrentWord and GetWord properties.

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

Published properties - design time
----------------------------------

property About: TLEAboutBox;
  This property displays an about box for the LEdit component.

property Align: TAlign;
  The Align property determines how the controls align within their 
  container (or parent control). These are the possible values:

  Value         Meaning
  --------------------------------------------------------------
  alNone        The component remains where you place it in 
                the form. This is the default value.
  alTop         The component moves to the top of the form
                and resizes to fill the width of the form. 
                The height of the component is not affected.
  alBottom      The component moves to the bottom of the form 
                and resizes to fill the width of the form.
                The height of the component is not affected.
  alLeft        The component moves to the left side of the 
                form and resizes to fill the height of the
                form. The width of the component is not 
                affected.
  alRight       The component moves to the right side of the 
                form and resizes to fill the height of the form.
                The width of the component is not affected.
  alClient      The component resizes to fill the client area 
                of a form. If a component already occupies part 
                of the client area, the component resizes to fit 
                within the remaining client area.

  If the form or a component containing other components is resized, 
  the components realign within the form or control.

  Using the Align property is useful when you want a control to stay
  in one position on the form, even if the size of the form changes. 
  For example, you could use a panel component with a various controls 
  on it as a tool palette. By changing Align to alLeft, you guarantee
  that the tool palette always remains on the left side of the form 
  and always equals the client height of the form.
  See Delphi help for details.

property AutoIndent: 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.

property BackColorSelected: TColor;
  This property sets the background color of selected text within LEdit.
  The default is clHighlight. See Delphi help for TColor for details.

property BookmarksMax: TLEBookmarksMax;
  This property allows you to set the maximum number of bookmarks that can be
  set. Note: As the number of bookmarks is increased, the speed of LEdit is
  decreased. The maximum is 255. Default is 16.

property BorderStyle: TBorderStyle;
  This property sets the style of the border around the LEdit component.
  The default is bsSingle.

  These are the possible values:

  Value       Meaning
  ------------------------------------------
  bsNone      No visible border
  bsSingle    Single-line border

property CanChangeFile: 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 True.

property CanChangeFont: 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 True.

property CaretWidth: Word;
  This property allows the width of the carat to be set. When this property is
  set, it normally changes the width of the carat to the right. Any value over 
  32767 causes the carat width to be set to the left instead of the right. 
  Default is 0.

property Color: TColor;
  This property sets the background color of the LEdit window. See the Delphi
  help for details.

property Ctl3D: Boolean;
  This property determines whether a control has a three-dimensional (3-D) or
  two-dimensional look. If Ctl3D is True, the control has a 3-D appearance. If
  Ctl3D is False, the control appears normal or flat. The default value of
  Ctl3D is True. See the Delphi help for details.

property CurrentWordAsText: Boolean;
  When set, all operations retrieving a word from the cursor position will
  receive whole words delimited with spaces, tab characters and line breaks.
  Otherwise the meaning of the word is determined by current syntax. The 
  default is False.

property DefaultExt: String;
  This property allows the default file extension to be set. This is the
  extension that is automatically added to a filename if no extension is
  specified. The default is 'TXT'.

property DefaultSelection: 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 (by executing WM_CUT). 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 True.

property DragCursor: TCursor;
  The DragCursor property determines the shape of the mouse pointer when the
  pointer is over a component that will accept an object being dragged. See the
  Delphi help for details.

property DragMode: TDragMode;
  The DragMode property determines the drag and drop behavior of a control.

  These are the possible values:

  Value        Meaning
  ---------------------------------------------------------
  dmAutomatic  If dmAutomatic is selected, the control is
               ready to be dragged; the user just clicks
               and drags it.
  dmManual     If dmManual is selected, the control can't
               be dragged until the application calls the
               BeginDrag method.

  If a control's DragMode property value is dmAutomatic, the application can
  disable the drag and drop capability at run time by changing the DragMode
  property value to dmManual. See the Delphi help for details.

property Enabled: Boolean;
  The Enabled property controls whether the control responds to mouse,
  keyboard, and timer events. If Enabled is True, the control responds
  normally. If Enabled is False, the control ignores mouse and keyboard
  events. See the Delphi help for details.

property EndLine: LongInt;
  This property allows the end line to be set. This is used for all methods
  that use the TLEditPosition record (such as SetSelection and GetSelection).
  See the GetScan property.

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

property ExtraComments: Boolean;
  This property allows extra comment types to be defined in the Syntax property.
  If it is set to True then the 6th and 7th items in the Syntax property are 
  treated as alternative comments in the same way as the 4th and 5th items. 
  These comments cannot start with the same character as the main comments.

property ExtraHorzSpacing: TLESpaceStyle;
  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 slNone.

  These are the possible values:

  Value          Meaning
  ----------------------------------
  slNone         Not indented
  slSmall        Indented 2 pixels
  slMedium       Indented 4 pixels
  slLarge        Indented 6 pixels

property ExtraVertSpacing: TLESpaceStyle;
  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 slNone.

  These are the possible values:

  Value          Meaning
  ---------------------------------------
  slNone         No extra pixel spacing
  slSmall        2 pixels extra spacing
  slMedium       4 pixels extra spacing
  slLarge        6 pixels extra spacing

property FileMask: String;
  This property allows you to set the mask for the Open dialog. It can accept
  the mask as the standard Delphi file Filter property, or it can accept the
  mask as the LEdit DLL requires. See the Delphi help for the Filter property
  for details of how to use this property. Also see the LEdit documentation for
  details of the LEdit style. This property will accept both styles.

property FileName: String;
  This property allows the filename to be set for any file operations
  performed in LEdit. This property contains some special behaviors. If the
  InitializeType property is set to isFile and the name of a file is specified
  in this property, then the file will be automatically loaded upon startup.
  If the InitializeType property is set to isFile and this property is set to
  '+', then an Open dialog will be displayed upon startup to allow the user to
  select a file to load into LEdit upon startup. If InitializeType is set to
  isCustom, then this property is used for any other file operations. This
  property also works at design time.

property FirstVisibleLine: LongInt;
  This property sets and returns the number of the first visible physical line
  in LEdit. Changed from 'Read only' to allow the property to be set and moved
  to the published section to allow it to be set at design time. The Skip 
  property can be used to set the Skip amount for this property.

property FirstVisiblePos: Word;
  This property returns the number of the first visible position within 
  a line in LEdit. Changed from 'Read only' to allow the property to be set and
  moved to the published section to allow it to be set at design time.

property Font: TFont;
  This property allows you to set the font and the font attributes (foreground
  color, etc.) in LEdit. See the Delphi help for details.

property ForeColorSelected: TColor;
  This property sets the foreground color of selected text within LEdit. The
  default is clHighlightText. See the Delphi help on TColor for details.

property GroupNumber: Word;
  This property specifies the number of a group. It should be set to 0 if 
  groups are not used. If it is not zero, then all controls with the same
  GroupNumber are united into a single group and share some attributes - 
  currently Find/Replace dialogs and Insert/Overwrite status. The default
  is 0.

property HasFile: 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 True.

property HasMenu: TLEPopupStyle;
  This property allows the type of popup menu to be set. LEdit contains its
  own internal popup menu and Delphi contains its own way of handling popup
  menus. This allows either to be used. The default is psDelphi.

  These are the possible values:

  Value          Meaning
  ----------------------------------
  psNone         No popup menu
  psStandard     LEdit popup menu
  psDelphi       Delphi popup menu

property Highlight: Boolean;
  This property causes the control to begin firing the OnControlHighlight
  event. This allows it to determine which colors to use when drawing each
  word. The default is False.

property InitializeType: TLEInitStyle;
  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 isFile, then
  the Filename property determines which file is loaded. See the FileName
  property for details. If isCustom is set, then the OnTimeToLoadText event
  is fired upon startup to allow you to initialize it any way you wish. See
  OnTimeToLoadText event for details. The default is isCustom.

  These are the possible values:

  Value          Meaning
  -------------------------------------------------------
  isFile         Initialize with a file
  isCustom       Initialize in a custom designed manner

property InsertMode: 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.

property Item2AsComment: Boolean;
  This property allows extra comment types to be defined in the Syntax property.
  If it is set to True then the second item of the Syntax property is treated
  as an alternative comment sign instead of an alternative quote.

property MacStyleSave: Boolean;
  This property allows you to save a file out as a Macintosh style file. 
  If set to True, LEdit uses Line Feed (CR) as line breaks when it saves 
  files. Otherwise it uses Carriage Return - Line Feed(CR-LF) pairs or
  just Line Feed (LF) if the UnixStyleSave property is set to True. The 
  default is False. LEdit can read any of these styles of file in. If the
  file is a Mac or Unix style file, it will automatically break the lines
  appropriately. The loading of files works the same regardless of how 
  this property is set. If both this and the UnixStyleSave property are
  set to True, the UnixStyleSave property takes precedence.

property MultilineItems: Boolean;
  This property allows multi-line comments and strings when it is set to
  True. Otherwise comments, and strings are only recognized when they are
  within a single-line. When set to true, it slows down editing slightly.
  The default is False.

property MultiLineStrings: Boolean;
  This property is only valid if the MultiLineItems property is set to True.
  Normally a string needs a meta character at the end of the line to continue
  on the next line. This property forces strings to go over lines breaks without 
  looking for the meta character. MultiLineStrings and SingleLineStrings cannot
  both be set to True at the same time. If SingleLineStrings is set to True and
  MultiLineStrings is changed to True, it will automatically set 
  SingleLineStrings to False. Default is False.

property NoPrintDialog: Boolean;
  This property determines whether the Print dialog is displayed or not. If it
  is set to True, then LEdit will not display the print dialog when the Print
  method is called. If it is set to False, then the print dialog will be 
  displayed.

property NoPrintProgress: Boolean;
  This property determines whether the Print Progress dialog is displayed or 
  not. If it is set to True, then LEdit will not display the print progress 
  dialog while printing. If it is set to False, then the print progress dialog 
  will be displayed.

property PaintMode: TLEPaintStyle;
  This property is used to set the mode for painting on the background of
  LEdit. This allows custom backgrounds (bitmaps) to be placed behind the
  text. The default is dsNone. See the OnPaint event for more details.

  These are the possible values:

  Value          Meaning
  ---------------------------------------------------------
  dsNone         LEdit paints its own background (Standard)
  dsDirect       Allows you to paint directly to the LEdit
                 background.
  dsUseMemoryDC  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.

property ParentColor: Boolean;
  The ParentColor property determines where the control looks for its
  color information. If ParentColor is True, the control uses the color
  in its parent component's Color property. If ParentColor is False,
  the control uses its own Color property. See the Delphi help for
  details. The default is False.

property ParentCtl3D: Boolean;
  The ParentCtl3D property determines where the component looks to
  determine if it should appear three dimensional. If ParentCtl3D is
  True, the component uses the dimensionality of its parent component's
  Ctl3D property. If ParentCtl3D is False, the control uses its own
  Ctl3D property. See the Delphi help for details.

property ParentFont: Boolean;
  The ParentFont property determines where the control looks for its font
  information. If ParentFont is True, the control uses the font in its
  parent component's Font property. If ParentFont is False, the control
  uses its own Font property. See the Delphi help for details.

property ParentShowHint: Boolean;
  The ParentShowHint property determines where the control looks to find
  out if Help Hint, specified as the value of the Hint property for the
  control, should be shown. If ParentShowHint is True, the control uses
  the ShowHint property value of its parent. If ParentShowHint is False,
  the control uses its own ShowHint property. See the Delphi help for
  details.

property PopupMenu: TPopupMenu;
  The PopupMenu property identifies the name of the pop-up menu that
  appears when the user selects the component and presses the right mouse
  button (if the pop-up menu's AutoPopup property is True), or when the
  Popup method of the pop-up menu executes. This property allows you to
  attach LEdit to a Delphi popup menu component. See the Delphi help for
  details.

property PrintJobName: String;
  The PrintJobName property identifies the name of the print job as it appears
  in the print queue.

property ReadOnly: 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.

property ScrollBars: TLEScrollStyle;
  This property allows you to turn on and off scroll bars on LEdit. The
  default is ssNone.

  These are the possible values:

  Value          Meaning
  ---------------------------------------------------------
  lsNone         No scroll bars are placed on LEdit
  lsHorizontal   A horizontal scroll bar is placed on LEdit
  lsVertical     A vertical scroll bar is placed on LEdit
  lsBoth         Both vertical and horizontal scroll bars
                 are placed on LEdit

property ShowHint: Boolean;
  The ShowHint property determines if the control should display a Help
  Hint when the user's mouse pointer rests momentarily on the control. The
  Help Hint is the value of the Hint property, which is displayed in a box
  just beneath the control. If the ShowHint property is True, the Help Hint
  will appear. If ShowHint is False, the Help Hint may or may not appear.
  If ParentShowHint is False also, the Help Hint won't appear. If, however,
  ParentShowHint is True, whether or not the Help Hint appears depends on
  the setting of the ShowHint property of the control's parent.

  Changing the ShowHint value to True automatically sets the ParentShowHint
  property to False. The default value is False. See the Delphi help for
  details.

property SingleLineStrings: Boolean;
  This property is only valid if the MultiLineItems property is set to True.
  This property forces strings to continue to be a single line. In other words
  it needs the line break meta character to end the strings. MultiLineStrings 
  and SingleLineStrings cannot both be set to True at the same time. If 
  MultiLineStrings is set to True and SingleLineStrings is changed to True, it 
  will automatically set MultiLineStrings to False. Default is False.

property Skip: Word;
  With word wrap, one physical line of text may be represented by several logical
  lines on the screen. This property returns the number of logical lines that are 
  not visible on the screen. If the WordWrap property is set to False, then this
  property always returns 0. If this property is set, then it sets the Skip value
  for the FirstVisibleLines property.

property StartInComments: Boolean;
  This property forces the syntax analizer to think that there is a left 
  comment at the beginning of the text. This helps for syntax highlighting
  HTML tags. The '<' can be set as the ending comment sign and the '>' can
  be set as the starting comment sign. If there is plain text at the start
  of the file, then this property will cause it to be regarded as a comment
  so it is treated the same as the rest of the commented text. See the FAQ 
  for more details on HTML syntax highlighting. This property works only if
  the MultilineItems property is set to True. The default is False.

property StartLine: LongInt;
  This property allows the start line to be set. This is used for all methods
  that use the TLEditPosition record (such as SetSelection and GetSelection).
  See the GetScan property.

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 TLEditPosition record (such as
  SetSelection and GetSelection). See the GetScan property.

property Syntax: 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.
  A value of 3 means that the next single character is not considered as a word
    when it occurs. The character is treated as a delimiter only and is glued to
    the characters that follow it. For example, if the character specified is $
    then the string "one$two" will be parsed into "one" and "$two". This makes
    sense for languages like Perl.
  A value of 4 means the exact same thing as 3 (above) but the character is
    glued to the end of the word that follows it. For example, if the character
    specified is $, then the string "one$two" will be parsed into "one$" and
    "two".

  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 seven 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. If the Item2AsComment property is set
          to true, then this defines an alternate comment and acts the same as
          the 3rd item (below).
    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}.
    6     Alternative Starting (or Left) Comment Sign. This item works exactly 
          like item 4 (above) if the ExtraComments property is set to True. 
          Otherwise, it defines the custom syntax like normal.
    7     Alternative Ending (or Right) Comment Sign. This item works exactly 
          like item 5 (above) if the ExtraComments property is set to True.
          Otherwise, it defines the custom syntax like normal.

  The first five fields must be the first 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). If the ExtraComments property is
  set to True, then the first seven fields must be the first fields defined in
  the string.

  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.

  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 length of this string 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 null terminated string (PChar). This string is actually parsed
  and sent to the LEdit DLL in the format described in the LEdit documentation.

property TabOrder: TTabOrder;
  The TabOrder property indicates the position of the control in its 
  parent's tab order, the order in which controls receive the focus 
  when the user presses the Tab key. TabOrder is meaningful only if 
  the TabStop property is True. See the Delphi help for details.

property TabStop: Boolean;
  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. The default is True.

property TabStopSize: TLETabStopSize;
  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.

property Text: String;  (32-bit version)
  When this property is read, it returns all the text within LEdit. This 
  property uses the Delphi 2.0 long string which will allow it to hold all the 
  text in the LEdit control. You can also place text into this property. This
  will place the text into LEdit.

property UndoDepth: Word;
  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.

property UnixStyleSave: Boolean;
  This property allows you to save a file out as a Unix style file. If set
  to True, LEdit uses Line Feed (LF) as line breaks when it saves files. 
  Otherwise it uses Carriage Return - Line Feed(CR-LF) pairs. The default
  is False. LEdit can read either style of file in. If the file is a Unix
  style file, it will automatically break the lines appropriately. The
  loading of files works the same regardless of how this property is set.

property Version: integer;
  This property returns the version number of the LEdit DLL.

property Visible;
  The Visible property determines whether the component appears onscreen. If
  Visible is True, the component appears. If Visible is False, the component 
  is not visible. See the Delphi help for details.

property WantReturns: Boolean;
  The WantReturns property determines whether return characters the user 
  enters in the component by pressing Enter affect the text in the component, 
  or go to the form. If WantReturns is True and the user presses Enter, a 
  return character is entered into LEdit. If WantReturns is False and the 
  user presses Enter, a return is not entered into LEdit, but instead goes 
  to the form. For example, if there is a default button on a form, pressing
  Enter would choose the button instead of affecting LEdit's text.

  To enter return characters in LEdit when WantReturns is False, press 
  Ctrl+Enter. The default is True. See the Delphi help for details.

property WantTabs: Boolean;
  The WantTabs property determines if tabs are enabled in the LEdit control.
  To enable tabs in LEdit, set WantTabs to True. To turn tabs off, set 
  WantTabs to False.

  Caution: 
    If WantTabs is True, the user can't use the Tab key to select 
    the next control on the form. The user can tab into the LEdit control, 
    but can't tab out. The default is False.

property WordWrap: Boolean;
  This property turns Word Wrap on or off. Default is False.

property WordWrapAuto: Boolean;
  This property sets the Automatic feature of word wrap to on or off. If it is
  set to True, words will be broken at spaces and tabs. Otherwise, LEdit will 
  fire the OnWordBreak event to allow word wrapping to be customized. Default 
  is True.

property WordWrapRMargin: Word;
  This property sets the extra right margin used by word wrap.

property WordWrapWidth: Word;
  This property defines the with of the Word Wrapping window. If it is set to 
  zero (0), then word wrapping will occur at the edge of the LEdit window. If it
  is set to any other value, then that value will be used as the width of the
  word wrapping window. Default is 0.

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

Events
------

property OnAskIfStoreFile: TNotifyEvent;
  This event is fired when an unsaved file is about to be closed. It is 
  always preceded by the OnGoingToClose event. 

property OnChange: TNotifyEvent;
  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.

property OnChangeMode: TNotifyEvent;
  This event is fired when the Insert/Overwrite mode is changed.

property OnClick: TNotifyEvent;
  This event is fired when the LEdit component is clicked. See the
  Delphi help for details.

property OnClipboardError: TNotifyEvent;
  This event is fired when a Clipboard error occurs during an attempt to
  place or read text to or from the clipboard.

property OnControlHighlight: TCHEvent;
  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
  ---------
  Sender: TObject    - This contains the object that called this event.
  WordType: Word     - This contains the type of the Word. See the LEdit
                       documentation for details.
  WordValue: LongInt - This contains the numeric value of the word as 
                       defined by the WordType variable.
  WordStr: String    - This contains the string value of the current word.

  Read and Write
  --------------
  ForeClr: TColor - This contains the current foreground color. This 
                    variable should be set to whatever forground (font) 
                    color you want the particular word returned in the
                    WordValue and WordStr variables.
  BackClr: TColor - This is the same as the ForeClr variable but returns 
                    the background color and is used to set the 
                    background color of the word.

property OnDblClick: TNotifyEvent;
  The OnDblClick event occurs when the user double-clicks the mouse button
  while the mouse pointer is over the component. See the Delphi help for 
  details.

property OnDragDrop: TDragDropEvent;
  The OnDragDrop event occurs when the user drops an object being dragged. 
  Use the OnDragDrop event handler to specify what you want to happen when 
  the user drops an object. The Source parameter of the OnDragDrop event
  is the object being dropped, and the Sender is the control the object is 
  being dropped on. The X and Y parameters are the coordinates of the 
  mouse positioned over the control. See the Delphi help for details.

property OnDragOver: TDragOverEvent;
  The OnDragOver event occurs when the user drags an object over a 
  component. Usually you'll use an OnDragOver event to accept an object 
  so the user can drop it. See the Delphi help for details.

property OnEndDrag: TEndDragEvent;
  The OnEndDrag event occurs whenever the dragging of an object ends, 
  either by dropping the object or by canceling the dragging. Use the 
  OnEndDrag event handler to specify any special processing you want 
  to occur when dragging stops. If the dragged object was dropped and 
  accepted by the control, the Target parameter of the OnEndDrag event 
  is True. If the object was not dropped successfully, the value of 
  Target is nil. See the Delphi help for details.

property OnEnter: TNotifyEvent;
  The OnEnter event occurs when a component becomes active. Use the
  OnEnter event handler to specify any special processing you want to 
  occur when a component becomes active. See the Delphi help for details.

property OnExit;
  The OnExit event occurs when the input focus shifts away from one control 
  to another. Use the OnExit event handler when you want special processing 
  to occur when this control ceases to be active. See the Delphi help for
  details.

property OnFileError: TNotifyEvent;
  This event is fired when an error occurs during any file operations that
  LEdit performs.

property OnFindBrace: TFBEvent;
  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 what the opposite brace
  is. To do this, you place the opposite brace into caWord of the WordDesc
  property. See the Delphi example 'ledlp_5' to see how this is done.

  The following values are passed to this event:

  Read Only
  ---------
  Sender: TObject    - This contains the object that called this event.

  Read and Write
  --------------
  WordType: Word     - This contains the type of the Word. See LEdit
                       documentation.
  WordValue: LongInt - This contains the numeric value of the word as
                       defined by the WordType variable.
  WordStr: String    - This contains the current word.

  Write Only
  ----------
  BraceType: TLEBraceStyle - This contains the type of Brace that is
                             in the WordValue and WordStr variables. You
                             need to set this variable with the type of
                             brace the word is.

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

  Value                 Meaning
  -------------------------------------------------
  bsNone                The word is not a brace.
  bsLeftBrace           The word is a left brace.
  bsRightBrace          The word is a right brace.
  bsNoCaseLeftBrace     The word is a left brace
                        (case insensitive search).
  bsNoCaseRightBrace    The word is a right brace
                        (case insensitive search).

property OnGoingToClose: TNotifyEvent;
  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 OnAskIfStoreFile
  event. This event is fired when LEdit is ready to close. It is also
  fired any time a new file is started or opened.

property OnGotFocus: TNotifyEvent;
  This event is fired when the LEdit component receives focus.

property OnHorzScroll: TNotifyEvent;
  This event is fired when LEdit is scrolled horizontally.

property OnKeyDown: TKeyEvent;
  The OnKeyDown event occurs when a user presses any key while the
  control has focus. Use the OnKeyDown event handler to specify
  special processing to occur when a key is pressed. The OnKeyDown
  handler can respond to all keyboard keys including function keys
  and keys combined with the Shift, Alt, and Ctrl keys and pressed
  mouse buttons. The Key parameter of the OnKeyDown event handler is
  of type Word; therefore, you must use virtual key codes to
  determine the key pressed. See the Delphi help for details.

property OnKeyPress: TKeyPressEvent;
  The OnKeyPress event occurs when a user presses a single character
  key. Use the OnKeyPress event handler when you want something to
  happen as a result of pressing a single key. See the Delphi help
  for details.

property OnKeyUp;
  The OnKeyUp event occurs when the user releases a key that has been
  pressed. Use the OnKeyUp event handler when you want special
  processing to occur when a key is released. See the Delphi help for
  details.

property OnLostFocus: TNotifyEvent;
  This event is fired when the LEdit component loses focus.

property OnMaxLine: TNotifyEvent;
  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.

property OnMouseDown: TMouseEvent;
  The OnMouseDown event occurs when the user presses a mouse button
  with the mouse pointer over a control. Use the OnMouseDown event
  handler when you want some processing to occur as a result of
  pressing a mouse button. See the Delphi help for details.

property OnMouseMove: TMouseMoveEvent;
  The OnMouseMove occurs when the user moves the mouse pointer when the
  mouse pointer is over a control. Use the OnMouseMove event handler
  when you want something to happen when the mouse pointer moves within
  the control. See the Delphi help for details.

property OnMouseUp: TMouseEvent;
  The OnMouseUp event occurs when the user releases a mouse button that
  was pressed with the mouse pointer over a component. Use the OnMouseUp
  event handler when you want processing to occur when the user releases
  a mouse button. See the Delphi help for details.

property OnNotifyFound: TNotifyFoundEvent;
  This event is fired when LEdit is going to show a dialog with the search results
  from a Search or Replace. It allows you to show your own dialog. It is only fired
  when doing a search or replace from the built-in dialogs (ShowFindDialog, 
  ShowReplaceDialog).

  The following value is passed to this event:

  Read Only
  ---------
  Sender: TObject   - This contains the object that called this event.
  Code: Integer     - This contains the number of items treated. For 'ReplaceAll'
                      this is the number of items replaced (can be 0). For 'Find'
                      this is 0 if no matches were found. If something is found
                      then this event is not fired. For 'Find Brace' this is -1
                      if no brace was found.

  Write
  --------------
  Response: Integer - This is the return value. This allows you to tell LEdit
                      if you handled this event or not. CMD_DOITYOURSELF indicates
                      that LEdit should show the standard dialog, and CMD_REPLYOK
                      indicates that LEdit should not show the default dialog.

property OnNewFile: TNotifyEvent;
  This event is fired when LEdit creates a new file.

property OnNewFont: TNotifyEvent;
  This event is fired when the font is changed.

property OnPaint: TPaintEvent;
  This event is fired when the PaintMode property is set to dsDirect or
  dsUseMemoryDC and LEdit is ready to paint the background. This allows
  you to draw a special background or create a special bitmap for LEdit
  to place behind the text.

  The following values are passed to this event:

  Read Only
  ---------
  Sender: TObject   - This contains the object that called this event.
  DCHandle: HDC     - This contains the Handle to the device context that can
                      be drawn on. If the PaintMode property is set to
                      dsDirect, 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
                      dsUseMemoryDC 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.
  ClientArea: TRect - This contains the rectangle that describes the client
                      area of LEdit.

property OnPrintPage: TPrintEvent;
  This event is fired each time LEdit begins printing a new page. It allows the
  application to restrict LEdit text output, so that the application can draw a
  footer and header. The application can only draw on two bands, on the top 
  (header) and bottom (footer) of the page and should indicate in the return 
  values how much room it used. The number of page printed can be retrieved with
  the PrintedPageNum property. LEdit should not be changed in this event.

  Basically, it allows the user to paint a header and footer on the page to 
  be printed.

  The following values are passed to this event:

  Read Only
  ---------
  Sender: TObject    - This contains the object that called this event.
  PrintDC: HDC       - This contains the Device Context (DC) that the 
                       application can draw the footer and header on. This DC 
                       arrives set to MM_ANISOTROPIC mode. In no case can the 
                       application change the drawing mode or anything else in 
                       the DC. Otherwise, the print output will be corrupted.
  VerticalSize: Word - This contains the vertical size (height) of the paper 
                       sheet LEdit will print on. This is given in logical 
                       units of the DC used to draw the LEdit text.
  HorizontalSize: Word - This contains the horizontal size (width) of the paper.

  Write
  --------------
  HeaderSize: Word   - This allows the height of the header in logical units to
                       be passed back to LEdit. This reserves room at the top of
                       the page. LEdit will not draw in this space. If this is
                       not passed back then it defaults to 0.
  FooterSize: Word   - This allows the height of the footer in logical units to
                       be passed back to LEdit. This reserves room at the bottom 
                       of the page. LEdit will not draw in this space. If this is
                       not passed back then it defaults to 0.

property OnReadPreview: TReadPreviewEvent;
  This event is fired right after LEdit reads something from any file but before
  it processes the contents of the file.  This allows the application to change
  the data in the buffer.  The application cannot change the size of the buffer.
  Note: LEdit will not know if you change the buffer and will just think that the
  data came from the file unchanged.

  The following values are passed to this event:

  Read Only
  ---------
  Sender: TObject    - This contains the object that called this event.
  BufLen: Integer      - This contains the length of the buffer (guaranteed to 
                                be less than 64K).

  Read and Write
  --------------
  Buffer: PChar - This contains a pointer to the buffer containing the 
                       file data.

property OnSpaceError: TNotifyEvent;
  This event is fired when a memory error occurs.

property OnTimeToLoadText: TNotifyEvent;
  This event is fired at initialization, when the Initialize property is
  set to isCustom. This is to allow you to customize the way LEdit is
  initialized. The FileName property can't be changed from within this
  event handler, because OnTimeToLoadText is called from procedure setting
  FileName property. See the Initialize property for details.

property OnVertScroll: TNotifyEvent;
  This event is fired when LEdit is scrolled vertically.

property OnWordBreak: TWordWrapEvent;
  This event is fired when the WordWrap property is set to True and the 
  WordWrapAuto property is set to False. It allows the application to tell
  LEdit how to break the line during word wrap.

  WARNING!!! This event must be processed very fast because LEdit calls it 
             very frequently.

  The following values are passed to this event:

  Read Only
  ---------
  Sender: TObject    - This contains the object that called this event.
  Line: PChar        - This contains a pointer to the line to be broken.

  Read and Write
  --------------
  Position: SmallInt - This contains the last position (offset from the 
                       beginning of the string specified in the Line variable)
                       that may be used to break the line. The application
                       should set the value of this variable to a value 
                       close to the one passed in by this variable.

property OnWordClick: TWordClickEvent;
  This event is fired when a Word is double clicked in LEdit.

  The following values are passed to this event:

  Read Only
  ---------
  Sender: TObject    - This contains the object that called this event.
  WordType: Word     - This contains the type of the Word. See LEdit
                       documentation. 
  WordValue: LongInt - This contains the numeric value of the word as 
                       defined by the WordType variable.
  WordStr: String    - This contains the current word.

  Read and Write
  --------------
  WordHandled: Boolean - 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 False. 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 True. 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.

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

The following are the standard Delphi properties:
    Align, Color, Ctl3D, DragCursor, DragMode, Enabled, Font, 
    ParentColor, ParentCtl3D, ParentFont, ParentShowHint, PopupMenu,
    ShowHint, TabOrder, TabStop, Visible;


The following are the standard Delphi events:
    OnClick, OnDblClick, OnDragDrop, OnDragOver, OnEndDrag, OnEnter,
    OnExit, OnKeyDown, OnKeyPress, OnKeyUp, OnMouseDown, OnMouseMove,
    OnMouseUp;

