Entry No.
649
|
Documentation - On-line help
The documentation reports that TParaAttributes' FirstIndent, LeftIndent, RightIndent, and Tab properties are specified in pixels. This is not the case.
|
|
| 1.02 |
2.01 |
3.0 |
3.01 |
3.02 |
4.0 |
4.01 |
4.02 |
4.03 |
5.0 |
5.01 |
6.0 |
6.01 |
6.02 |
Kylix 1.0 |
| N/A | Exists | Exists | Exists | Exists | Exists | Exists | Exists | Exists | Exists | Exists | Exists | Unknown | Unknown | Unknown |
|
|
|
Description | |
|
Reported by Bruce Roberts; checked by Jordan Russell
The documentation reports that TParaAttributes' FirstIndent,
LeftIndent, RightIndent, and Tab properties are specified in pixels. This is not the
case. The Windows Rich Edit control works with TWIP measurements
(1440/inch). The VCL source (ComCtrls) divides/multiplies the specified
values in TParaAttributes by 20, meaning that the TParaAttributes'
FirstIndent, LeftIndent, RightIndent, and Tab properties are expressed in
points (72/inch).
|
|
|
User-contributed comments | |
Si 13 Jul 2002 11:17 PM GMT |
I disagree with this report...
Here is my line of code:
rEdit.paragraph.tab[0]:=216;
The tab position is expressed in pixels at 72 dpi. When I look at the RTF produced by the line:
rEdit.lines.savetofile(savedialog1.filename);
I see the RTF code looking like this:
\deflang1033\pard\tx4320\plain\f3\fs20
the tx4320 bit refers to the TWIP version of the 216 pixels, as you would expect from:
216/72 = 3
and:
3 * 1440 = 4320
ie: 3 inches = 4320 twips
Therefore, defining the tab in pixels at 72 dpi gets the correct twip value in the RTF file, and, yes, the RTF file does use twips, but the TRichEdit control is using pixels,
This happens is in D3 and D6.02
|
|