Skip over navigation

Welcome to the all new DelphiDabbler website.

I hope you like it.

There are going to be bugs. Please report any you find on the website's issues page (GitHub account required). Thanks.

Click the close button and you won't see this message again.

Extended String Property Editor

Extended property editor for string and TCaption properties

Version 2.0.3
Released 12 Jan 2014
Platforms Win32
Framework IDE
Compatibilty Delphi 6 & later

Overview

This extension of Delphi's string property editor has been designed to get round two limitations of the standard property editor:

  1. You can't enter multi-line strings with embedded CR/LF characters via the object inspector. Such strings can only be assigned at run-time.
  2. Although 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 string and TCaption properties. It adds an ellipsis button to the right hand side of the data entry area in the object inspector. Clicking this button displays a dialogue box in which the property's value can be entered. Pressing Return in the dialogue 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. If, or how, any newline characters will be displayed in the object inspector depends on the version of Delphi being used, but they will be retained.

The edit dialogue is resizable. Word wrapping can be switched on or off. Both the word-wrapping and dialogue box size and position are persistent. The dialogue box has a toolbar that provides buttons to:

  • Select all the text in the editor.
  • Clear all the text from the editor.
  • Overwrite the editor's existing text with text from the clipboard.
  • Copy all the text from the editor to the clipboard.
  • Undo the last edit.
  • Load text into the editor from a file.
  • Save the contents of the editor to a file.
  • Display online help.

In addition the normal cut, copy and paste operations are available via a context menu and the usual keywboard shortcuts.

Our first screen shot is of the extended string editor dialogue box, called from Delphi 2010, displaying a two line string.

Extended String Property Editor Screen Shot

The second screen shot shows the object inspector displaying a multi-line string in a label's caption. This caption has been entered using the extended string property editor. The ellipsis button displays the editor when clicked.

Object Inpsector Screen Shot

As can be seen above we are editing a TLabel. The final screenshot shows the label on a form at design time, displaying the two lines of text.

Form screen shot

Get The Code

You can download the latest version of the Extended String Property Editor directly from SourceForge as dd-stringpe-2.0.3.zip.

Download v2.0.3

Extended String Property Editor is a sub-project of the DDabLib project which is maintained in a Subversion repository. The code is developed in the trunk/projects/stringpe branch.

Subversion users can check out the source code of the current release from the repository on SourceForge by doing:

svn checkout http://svn.code.sf.net/p/ddablib/code/tags/projects/stringpe/release-2.0.3 codedir

where codedir is the directory where you want to checkout code. To check out other versions, simply specify a different version number.

The latest development tree can be checked out using:

 svn checkout http://svn.code.sf.net/p/ddablib/code/trunk/projects/stringpe codedir

Check outs are read only, but you can easily contribute code: see Feedback & Queries below.

Installation

The Extended String Property Editor is 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:

  • PJStringPE.pas – property editor source code.
  • PJStringPE.dfm – property editor form file.
  • ReadMe.htm – read-me file.
  • ChangeLog.txt – project change log.
  • MPL-2.txt – the Mozilla Public License v2.0.
  • Documentation.URL – short-cut to the editor's online documentation.

PJStringPE.pas and PJStringPE.dfm must be included in a design time package that is then installed into the IDE. If you need help doing this see here.

Ensure that the package containing the property editor includes the DesignIDE package in its requires clauses.

Documentation

The Extended String Property Editor is documented online here. If presented with a choice of versions, choose version 2.

The project's change log can be viewed on SourceForge

A read-me file (ReadMe.htm) is included in the project download.

Feedback & Queries

If you find any bugs or want to suggest a new feature please report them using the Issue Tracker.

Click the Create Ticket button to create a ticket then complete the form giving as much information as possible.

The issue tracker is shared among all the projects in the DelphiDabbler Code Library, so please make sure you enter stringpe in the Project edit box to make it clear which project you are referring to. You should also choose Defect in the Type drop down list to report a bug or Enhancement to request a new feature.

If you have created a bug fix or have implemented a new feature please attach a zip file to your ticket that contains your source code.

Should you have any queries about using the editor please read the documentation for version 2. If you can't find an answer in the documentation then post a message in the discussion group.

License & Credits

The Extended String Property Editor is open source. It is copyright © 2004-2014 by Peter Johnson. The source code is made available under the terms of the Mozilla Public License v2.0. All relevant trademarks are acknowledged.

Thanks to the following who have contributed to this project:

  • Richard C Haven
  • Bino

Acknowledgements

The property editor uses or adapts icons from the following collections:

  • The 16×16 Free Application Icons packs by Creative Commons Attribution-Share Alike 3.0 Aha-soft, licensed under a (CC BY-SA 3.0) license.
  • The Free Pixelbox icon sets from Icojam, free to use in any kind of commercial or non-commercial project.