ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TIERichEdit - Margins

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Rea.B Posted - Nov 21 2025 : 14:04:34
Is there a way to specify margins? The following works if I use a text editor to insert
\margl1080\margr1080\margt1080\margb1080 after the initial \rtf1 tag.

This would be helpful when opening the rtf file in MS Word as it would help to preserve the formatting.

This component is really nice to use! :-)

Thanks.

Rea B.
4   L A T E S T    R E P L I E S    (Newest First)
Rea.B Posted - Nov 23 2025 : 03:36:00
Thank you Nigel!


Rea B.
xequte Posted - Nov 22 2025 : 20:48:11
Hi Rea

For that, you also need to set Editor.Paragraph.FirstIndent (which is relative to the Left Indent).

TIERichEdit uses the Windows Rich Edit API, which does not support top and bottom margins, but you can use the similar SpaceBefore and SpaceAfter:

// Add 1/4 inch of space before and after the paragraph
// const Points_Per_Inch = 72;
IERichEdit1.Paragraph.SpaceBefore := Round( 0.25 * Points_Per_Inch );
IERichEdit1.Paragraph.SpaceAfter  := Round( 0.25 * Points_Per_Inch );


Nigel
Xequte Software
www.imageen.com
Rea.B Posted - Nov 22 2025 : 03:29:03
Hi Nigel.

I added a popup menu and a method with the above code, ran the program, selected a paragraph, executed the method and got the margin of choice for all lines except the first one. I also need top and bottom "indents" but could not find them.

Is it possible to add document wide margins to this component in the future?

Thanks for your help, and consideration!

Rea B.
xequte Posted - Nov 21 2025 : 16:54:58
Hi Rea

Yes, you can use the Paragraph property, e.g.

// Specify a left-margin for the current paragraph of 1 inch
// const Points_Per_Inch = 72;
IERichEdit1.Paragraph.LeftIndent := 1 * Points_Per_Inch;


https://www.imageen.com/help/TIERichEdit.Paragraph.html

Nigel
Xequte Software
www.imageen.com