-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstringpe.html
242 lines (234 loc) · 10.5 KB
/
stringpe.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
---
dl-file-prefix: "dd-stringpe-"
layout: "codelib-tplt"
group: lib
priority: 17
version: "2.0.3"
release-date: "2014-01-12"
platforms: ["Win32"]
frameworks: ["IDE"]
compatibility: "Delphi 6 & later"
title: "Extended String Property Editor"
precis: "Extended property editor for string and TCaption properties"
summary: "Property editor for properties of type string and TCaption that extends the default editor to provide a dialogue box for editing multi-line strings."
meta-title: "Multi-line String Property Editor for Delphi Pascal IDE | Open Source"
meta-desc: "String and TCaption property editor extension for the Delphi IDE that enables multi-line strings to be entered via a dialogue box. For Delphi 6 & later."
download-base-url: "https://sourceforge.net/projects/ddablib/files/stringpe/"
repo-url: "https://github.com/ddablib/stringpe"
docs-url: "https://github.com/delphidabbler/ddab-lib-docs/blob/master/Docs/StringPE.md"
want-header-buttons: true
status: "current"
---
{% assign dl-file = page.dl-file-prefix | append: page.version | append: ".zip" %}
{% assign dl-url = page.download-base-url | append: dl-file %}
<section class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">
Overview
</h2>
</div>
<div class="panel-body">
<p>
This extension of Delphi's string property editor has been designed to get round two limitations of the standard property editor:
</p>
<ol class="wide">
<li>
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.
</li>
<li>
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.
</li>
</ol>
<p>
The enhanced property editor works with <strong>string</strong> and <var>TCaption</var> 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 <span class="text-smallcaps">Return</span> in the dialogue box starts a new line. There is no practical limit to the length of strings that can be entered.
</p>
<p>
Clicking <em>OK</em> (or pressing <span class="text-smallcaps">Ctrl+Return</span>) 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.
</p>
<p>
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:
</p>
<ul>
<li>
Select all the text in the editor.
</li>
<li>
Clear all the text from the editor.
</li>
<li>
Overwrite the editor's existing text with text from the clipboard.
</li>
<li>
Copy all the text from the editor to the clipboard.
</li>
<li>
Undo the last edit.
</li>
<li>
Load text into the editor from a file.
</li>
<li>
Save the contents of the editor to a file.
</li>
<li>
Display online help.
</li>
</ul>
<p>
In addition the normal cut, copy and paste operations are available via a context menu and the usual keywboard shortcuts.
</p>
<h3 data-toggle="collapse" data-target="#screenshots" class="collapsible collapsed">
Screen shots
</h3>
<div id="screenshots" class="collapse"> <!-- begin collapsible #screenshots section -->
<p>
Our first screen shot is of the extended string editor dialogue box, called from Delphi 2010, displaying a two line string.
</p>
<p>
<img src="{{ site.data.core.software-images-base-url}}/stringpe-1.png" alt="{{ page.title }} Screen Shot" title="{{ page.title }}" class="scale center-block" />
</p>
<p>
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 <em>{{ page.title }}</em> The ellipsis button displays the editor when clicked.
</p>
<p>
<img src="{{ site.data.core.software-images-base-url}}/stringpe-2.png" alt="Object Inpsector Screen Shot" title="Object Inspector showing elipsis leading to property editor" class="scale center-block" />
</p>
<p>
As can be seen above we are editing a <var>TLabel</var>. The final screenshot shows the label on a form at design time, displaying the two lines of text.
</p>
<p>
<img src="{{ site.data.core.software-images-base-url}}/stringpe-3.png" alt="Form screen shot" title="Two line label in form" class="scale center-block" />
</p>
</div> <!-- /#screenshots -->
</div>
</section>
<section class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">
Get The Code
</h2>
</div>
<div class="panel-body">
<p>
You can download the latest version of the <em>{{page.title}}</em> directly from SourceForge as <code>{{ dl-file }}</code>.
</p>
<p class="text-center">
<a class="btn btn-primary" role="button" href="{{ dl-url }}" aria-label="Go to SourceForge and download latest version automatically">Download <span class="hidden-xs">release </span>v{{ page.version }}<span class="hidden-xs"> from SourceForge</span></a>
</p>
<p>
The <em>{{ page.title }}</em> source code is hosted in the <a href="{{ page.repo-url }}" aria-label="Link to the ddablib/stringpe repository on GitHub"><code>ddablib/stringpe</code></a> GitHub repository. You can <code>git clone</code> or fork the repository as required.
</p>
</div>
</section>
<section class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">
Installation
</h2>
</div>
<div class="panel-body">
<p>
The <em>{{ page.title }}</em> 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:
</p>
<ul class="list-group">
<li class="list-group-item">
<strong><code>PJStringPE.pas</code></strong> – property editor source code.
</li>
<li class="list-group-item">
<strong><code>PJStringPE.dfm</code></strong> – property editor form file.
</li>
<li class="list-group-item">
<code>ReadMe.htm</code> – read-me file.
</li>
<li class="list-group-item">
<code>ChangeLog.txt</code> – project change log.
</li>
<li class="list-group-item">
<code>MPL-2.txt</code> – the Mozilla Public License v2.0.
</li>
<li class="list-group-item">
<code>Documentation.URL</code> – short-cut to the editor's online documentation.
</li>
</ul>
<p>
<code>PJStringPE.pas</code> and <code>PJStringPE.dfm</code> must be included in a design time package that is then installed into the IDE. If you need help doing this <a href="{{ site.data.core.install-to-ide-link }}" aria-title="see a tip on working with design time packages">see here</a>.
</p>
<p class="alert alert-info glyph">
Ensure that the package containing the property editor includes the <em>DesignIDE</em> package in its <strong>requires</strong> clauses.
</p>
</div>
</section>
<section class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">
Documentation
</h2>
</div>
<div class="panel-body">
<p>
The <em>{{ page.title }}</em> is documented online
<a href="{{ page.docs-url }}" aria-title="View the online documentation">here</a>. If presented with a choice of versions, choose version 2.
</p>
<p>
The project's change log can be viewed <a href="https://raw.githubusercontent.com/ddablib/stringpe/main/Docs/ChangeLog.txt" aria-title="View the change log in plain text">here</a>.
</p>
<p>
A read-me file (<code>ReadMe.htm</code>) is included in the project download.
</p>
</div>
</section>
<section class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title" id="feedback">
Feedback & Queries
</h2>
</div>
<div class="panel-body">
<p>
If you find any bugs or want to suggest a new feature please report them using the <em>{{page.title}}</em> <a href="https://github.com/ddablib/stringpe/issues">issue tracker</a>.
</p>
<p>
If you have created a bug fix or have implemented a new feature please open a pull request for it.
</p>
<p>
Should you have any queries about using the editor please read the <a href="{{ page.docs-url }}">documentation</a> for version 2. If you can't find an answer in the documentation then post a message in the <a href="https://github.com/orgs/ddablib/discussions">discussion group</a>.
</p>
</div>
</section>
<section class="panel panel-default">
<div class="panel-heading">
<h2 class="panel-title">
License & Credits
</h2>
</div>
<div class="panel-body">
<p>
<span class="fa fa-copyright fa-pull-left fa-3x"></span> The <em>{{ page.title }}</em> is open source. It is copyright © 2004-2014 by <a href="https://en.gravatar.com/delphidabbler" aria-label="Peter Johnson's Gravatar account">Peter Johnson</a>. The source code is made available under the terms of the <a href="https://www.mozilla.org/MPL/2.0/" aria-label="Mozilla Public License v2.0 on mozilla.org">Mozilla Public License v2.0</a>. All relevant trademarks are acknowledged.
</p>
<p>
Thanks to the following who have contributed to this project:
</p>
<ul>
<li>
Richard C Haven
</li>
<li>
Bino
</li>
</ul>
<h3>
Acknowledgements
</h3>
<p>
The property editor uses or adapts icons from the following collections:
</p>
<ul>
<li>
The 16×16 Free Application Icons packs by Creative Commons Attribution-Share Alike 3.0 <a href="http://www.aha-soft.com/">Aha-soft</a>, licensed under a (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC BY-SA 3.0</a>) license.
</li>
<li>
The Free Pixelbox icon sets from <a href="https://www.icojam.com/">Icojam</a>, free to use in any kind of commercial or non-commercial project.
</li>
</ul>
</div>
</section>