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
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Error with last fixes_3.2...
by
patyit
[
Today
at 11:00:39 pm]
Single and Double, Conver...
by
kupferstecher
[
Today
at 10:56:53 pm]
Fpcupdeluxe
by
patyit
[
Today
at 10:47:31 pm]
Lazarus syntax helpers
by
Edson
[
Today
at 10:34:34 pm]
Instruction-level paralle...
by
marcov
[
Today
at 10:13:00 pm]
What am I missing here? [...
by
Ten_Mile_Hike
[
Today
at 09:11:10 pm]
[New Component] ExtTabCtr...
by
wp
[
Today
at 08:31:58 pm]
Which Control should I us...
by
wp
[
Today
at 08:25:37 pm]
Can /my/ AI help me with ...
by
microxa
[
Today
at 08:25:36 pm]
[ANN] PasBuild v1.9.0 Rel...
by
Graeme
[
Today
at 08:14:26 pm]
If FileExists(
by
Remy Lebeau
[
Today
at 07:58:06 pm]
Codepage issue in console...
by
Hartmut
[
Today
at 07:52:43 pm]
Implementing an Elo ratin...
by
Warfley
[
Today
at 06:33:56 pm]
[SOLVED]Program experienc...
by
Thaddy
[
Today
at 05:39:33 pm]
RunFormula: math expressi...
by
stormray
[
Today
at 03:30:10 pm]
Message CM_ShowingChanged...
by
AlexTP
[
Today
at 01:21:03 pm]
MOVED: Eye Candy TESCheme
by
theo
[
Today
at 10:06:43 am]
storing assets for releas...
by
Handoko
[
Today
at 08:35:23 am]
TCHATGPT — An Artificial ...
by
marcelomaurinmartins@gmai
[
Today
at 02:20:11 am]
Mundo Medieval 3D MMORPG ...
by
Rodrigo Robles
[June 14, 2026, 05:26:38 pm]
Fast Canvas Library V1.05...
by
Gigatron
[June 14, 2026, 04:57:35 pm]
SynEdit theme
by
LemonParty
[June 14, 2026, 02:01:33 pm]
What happened to CocoaWSC...
by
Frank
[June 14, 2026, 01:31:19 pm]
Very rough version of a s...
by
Hansvb
[June 14, 2026, 12:44:31 pm]
Pdf Viewer in Pascal
by
Dzandaa
[June 14, 2026, 11:44:26 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Page Break in Rich Memo (Read 3447 times)
Badger
Full Member
Posts: 170
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 11 Lazarus v4.6 FPC 3.2.2 x86_64-win64-win32/win64
paweld
Hero Member
Posts: 1644
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: 170
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 11 Lazarus v4.6 FPC 3.2.2 x86_64-win64-win32/win64
paweld
Hero Member
Posts: 1644
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: 1324
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