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
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
Assigning result of a fun...
by
simsee
[September 13, 2024, 11:56:54 pm]
Any good tutorials for dg...
by
Mathias
[September 13, 2024, 11:00:55 pm]
Memory leak using TJPEGIm...
by
petevick
[September 13, 2024, 10:27:35 pm]
[SOLVED] How to "Jump To"...
by
RedOctober
[September 13, 2024, 09:52:28 pm]
How to use newer macOS SD...
by
Hansaplast
[September 13, 2024, 09:34:22 pm]
TryStrToFloat
by
BubikolRamios
[September 13, 2024, 08:56:18 pm]
programming with Lazarus
by
srvaldez
[September 13, 2024, 08:33:55 pm]
LED Multicolor Keyboard C...
by
MarkMLl
[September 13, 2024, 08:15:18 pm]
Effect of streaming in a ...
by
Thaddy
[September 13, 2024, 08:07:16 pm]
Browser User Agent & Frie...
by
Aruna
[September 13, 2024, 08:01:00 pm]
LazCAD – First Release!
by
maurog
[September 13, 2024, 07:13:54 pm]
Unexpected Project1 Form ...
by
Atlanta0001
[September 13, 2024, 07:05:07 pm]
Getting error: Undefined ...
by
DiegoF
[September 13, 2024, 05:22:21 pm]
Listview how to custom or...
by
VisualLab
[September 13, 2024, 05:06:37 pm]
Using synapse to send ema...
by
hamacker
[September 13, 2024, 03:50:53 pm]
Unable to Query the ODBC ...
by
Thaddy
[September 13, 2024, 03:43:31 pm]
Searching for a safe alte...
by
marcov
[September 13, 2024, 03:12:42 pm]
MariaDB sold to Investor
by
dbannon
[September 13, 2024, 02:55:32 pm]
Lazarus always uses a 32 ...
by
Martin_fr
[September 13, 2024, 02:37:27 pm]
Class designer/editor
by
Aruna
[September 13, 2024, 02:28:35 pm]
[Solved] Unable install l...
by
JohnnieK
[September 13, 2024, 09:12:35 am]
SnapTRAINER
by
davenardella
[September 13, 2024, 08:28:42 am]
Broken Icon Display on ma...
by
dsiders
[September 13, 2024, 07:31:54 am]
Local Vars often inspect ...
by
SandyG
[September 13, 2024, 05:21:45 am]
TListView.OnChange Event ...
by
msintle
[September 13, 2024, 02:18:23 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Page Break in Rich Memo (Read 2196 times)
Badger
Full Member
Posts: 153
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.2.4 FPC 3.2.2 Win 32/64
paweld
Hero Member
Posts: 1187
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: 153
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.2.4 FPC 3.2.2 Win 32/64
paweld
Hero Member
Posts: 1187
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: 1002
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