Extended String Property Editor
Information Sheet

Contents

» Contents

Description

This property editor has been designed to get round two limitations of the standard Delphi string property editor.

  1. The standard property editor does not allow multi-line strings with embedded CR/LF characters to be entered via the object inspector. Such strings can only be assigned run-time.
  2. Although 32 bit Delphi strings have a 2Gb size limit, the standard property editor only accepts strings up to 255 characters long. Once again, longer strings must be assigned at run-time.

The enhanced property editor works with every string or TCaption property. It adds an ellipsis button to the right hand side of the data entry area in the object inspector. Clicking this button displays a dialog box in which the property's value can be entered. Pressing return in the dialog box starts a new line. There is no practical limit to the length of strings that can be entered.

Clicking OK (or pressing Ctrl+Return) causes the entered text to be assigned to the property. Any new lines will be displayed in the object inspector as pairs of vertical bars or empty squares, depending on the Delphi version.

The edit dialog is resizable. Word wrapping can be switched on or off. Both the word-wrapping and dialog box size and position are persistent.

Load and Save buttons are provided in the dialog box to enable the property's value to be loaded from, or saved to a file.

» Contents

Compatibility

The property editor compiles and works with all versions of Delphi from Delphi 4. It has been tested with Delphi 4, 6, 7 and 2006.

» Contents

Installation

The Extended String Property Editor and its readme file are supplied in a zip file. Before installing you need to extract all the files from the zip file, preserving the directory structure. The following files will be extracted:

You can now proceed to install the property editor. Installation methods vary between Delphi versions, so follow the instructions that apply to your version below. Note that $(DELPHI) represents the path where the appropriate version of Delphi was installed. Similarly $(BDS) refers to the installation path of a version of the Borland Development System.

Installation with Delphi 2005 & 2006

The property editor must be installed into a Delphi Win32 design package. It is assumed that you will be installing into an existing package. You may decide to install into the "user" package: $(BDS)\Lib\dclusr.dpk.

  1. Decide upon a suitable location into which to install the property editor. This may be a subdirectory of your Borland Studio Projects or $(BDS)\lib folders.
  2. Copy PJStringPE.pas and PJStringPE.dfm to the chosen installation folder.
  3. Start the Development System (selecting the Delphi Win32 personality if appropriate) then:
  4. If you wish you can now delete PJStringPE.pas from the chosen installation folder.

Installation with Delphi 4 to 7

The property editor must be installed into a design package. It is assumed that you will be installing into an existing package. You may wish to use the "user" package named dclusr.dpk or dclusrXX.dpk (where XX is a version number). This package can be found in $(DELPHI)\Lib. For Delphi 6 and later ensure that the package "requires" designide.pas.

  1. Decide upon a suitable location into which to install the property editor. This may be a subdirectory of your $(DELPHI)\lib folder.
  2. Copy PJStringPE.pas and PJStringPE.dfm to the chosen installation folder.
  3. Start Delphi then:
  4. If you wish you can now delete PJStringPE.pas from the chosen installation folder.

» Contents

Update History

A complete change log is provided in a text file that is included in the download.

» Contents

License and Disclaimer

This source code is subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this program except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/.

Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.

The Original Code is PJStringPE.pas (Extended String Property Editor).

The Initial Developer of the Original Code is Peter Johnson (http://www.delphidabbler.com/).

Portions created by the Initial Developer are Copyright © 2004-2005 Peter Johnson. All Rights Reserved.

All relevant trademarks are acknowledged.

» Contents

About the Author

I'm Peter Johnson – a hobbyist programmer living in Ceredigion in West Wales, UK, writing write mainly in Delphi. My programs are available for download from: http://www.delphidabbler.com/.

Please let me know if you have any comments about the property editor, if you have found a bug, or you want to suggest any updates.