Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
Packages and Libraries
»
RichMemo
»
Page Break in Rich Memo
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
IRC channel
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
How to convert Real to Bi...
by
kwyan
[
Today
at 03:41:14 pm]
Linux snapshot zip files ...
by
TRon
[
Today
at 03:30:03 pm]
Lazarus 3.9.9 Variable Wa...
by
Martin_fr
[
Today
at 03:27:17 pm]
Battery Operations
by
msintle
[
Today
at 02:56:45 pm]
Anyone interested in test...
by
Josh
[
Today
at 02:09:03 pm]
New version of BGRABitmap
by
lainz
[
Today
at 01:15:01 pm]
[SOLVED] TLabeledEdit.Edi...
by
jipété
[
Today
at 01:09:42 pm]
Automatize build system
by
Чебурашка
[
Today
at 12:20:44 pm]
How to stay in the invali...
by
wp
[
Today
at 11:50:39 am]
lazarus controlling compi...
by
Bart
[
Today
at 11:33:03 am]
SVG thumbnails
by
domasz
[
Today
at 11:18:31 am]
Unique Instance Terminate...
by
Thaddy
[
Today
at 10:34:09 am]
i can't inatall Dam dialo...
by
TRon
[
Today
at 10:31:44 am]
CORDIC algorithms
by
Thaddy
[
Today
at 10:20:40 am]
Autentication Oracle
by
Thaddy
[
Today
at 09:16:19 am]
How to "create" a TFont a...
by
kwyan
[
Today
at 04:29:00 am]
SOLVED How to get PRAGMA ...
by
JanRoza
[
Today
at 01:36:33 am]
Component writing adding ...
by
andrew Bubble
[
Today
at 12:01:02 am]
Compare strange character...
by
nikel
[December 05, 2023, 11:33:21 pm]
Lazarus Release Candidate...
by
dbannon
[December 05, 2023, 11:18:03 pm]
Question about glibc bug ...
by
PascalDragon
[December 05, 2023, 10:22:15 pm]
Virtual Method
by
PascalDragon
[December 05, 2023, 08:51:54 pm]
Watchlist, order of the w...
by
Martin_fr
[December 05, 2023, 08:13:55 pm]
How to 'Hello world' on l...
by
FramX
[December 05, 2023, 07:39:07 pm]
Difference between TSpeed...
by
Hansvb
[December 05, 2023, 07:29:23 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Page Break in Rich Memo (Read 1100 times)
Badger
Full Member
Posts: 144
Page Break in Rich Memo
«
on:
March 17, 2023, 09:58:03 am »
Is there any way to insert a page break in rich memo so that when the Rich memo contents are pasted to the clipboard and then the clipboard pasted into a word processor such as LibreOffice, the page break shows up on the word processor?
Logged
Badger
(A bad tempered, grumpy animal that sleeps most of the winter!)
If at first you don't succeed - you're running about average!
I'm using Windows 10 Lazarus v2.4.4 FPC 3.2.2 Win 32/64
paweld
Hero Member
Posts: 851
Re: Page Break in Rich Memo
«
Reply #1 on:
March 17, 2023, 02:06:01 pm »
chr(12)
, eg.
Code: Pascal
[Select]
[+]
[-]
procedure
TForm1
.
AddPageBreakClick
(
Sender
:
TObject
)
;
begin
RichMemo1
.
Lines
.
Insert
(
RichMemo1
.
Lines
.
Count
div
2
,
#12
)
;
//add a pagebreak in the middle of text
RichMemo1
.
CopyToClipboard
;
end
;
Logged
Best regards / Pozdrawiam
paweld
Badger
Full Member
Posts: 144
Re: Page Break in Rich Memo
«
Reply #2 on:
March 18, 2023, 05:24:36 am »
Thanks - works perfectly.
Just for completeness, how would you remove the page break?
Logged
Badger
(A bad tempered, grumpy animal that sleeps most of the winter!)
If at first you don't succeed - you're running about average!
I'm using Windows 10 Lazarus v2.4.4 FPC 3.2.2 Win 32/64
paweld
Hero Member
Posts: 851
Re: Page Break in Rich Memo
«
Reply #3 on:
March 18, 2023, 08:49:00 am »
Code: Pascal
[Select]
[+]
[-]
RichMemo1
.
Lines
.
Text
:
=
StringReplace
(
RichMemo1
.
Lines
.
Text
,
#12
,
LineEnding
,
[
rfReplaceAll
]
)
;
//remove all pagebreaks
Logged
Best regards / Pozdrawiam
paweld
Nicole
Hero Member
Posts: 790
Re: Page Break in Rich Memo
«
Reply #4 on:
March 18, 2023, 11:02:42 am »
2 more code snippets go into my library...
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
Packages and Libraries
»
RichMemo
»
Page Break in Rich Memo
TinyPortal
© 2005-2018