Extended String Property Editor

   
Release: 2.0.3
Date: 12 January 2014
Delphi Compatibility:
D1 D2 D3 D4 D5 D6 D7 D2005 D2006 D2007 D2009 D2010 DXE DXE2 DXE3 DXE4
Red LED Red LED Red LED Red LED Red LED Green LED Green LED Green LED Green LED Green LED Green LED Green LED Green LED Green LED Green LED Green LED

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 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. If, or how, any newline characters will be displayed in the object inspector depends on the version of Delphi being used.

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. The dialog 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.

Screen shots

Our first screen shot is of the extended string editor dialog 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

Documentation

This property editor is documented online.

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. Please note: this 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. 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 components please read the documentation.

If you can't find an answer in the documentation then post a message in the discussion group.

Please do not email me or use the contact page to report bugs, ask for new features or to find out how to use the property editor.
I'm afraid I have very limited time available to support the code library, and can't guarantee I'll find time for personalised advice.