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
TGroupBox WMPaint ...
by
Espectr0
[
Today
at 10:46:52 pm]
MDB: list all tables
by
SymbolicFrank
[
Today
at 09:23:25 pm]
Crear dll en lazarus para...
by
BlueIcaro
[
Today
at 07:41:01 pm]
NBPages in TabControl... ...
by
polpero
[
Today
at 07:28:59 pm]
Amount in words
by
alpine
[
Today
at 06:43:52 pm]
From Linux MX to Windows ...
by
pentilisea
[
Today
at 04:55:07 pm]
rtl/inc/objpas.inc proced...
by
BrunoK
[
Today
at 04:32:17 pm]
Dark Theme in my program?
by
d7_2_laz
[
Today
at 03:39:39 pm]
Error Firebird in Lazarus
by
rvk
[
Today
at 02:49:58 pm]
Problems installing devel...
by
MarkMLl
[
Today
at 12:37:22 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Page Break in Rich Memo (Read 303 times)
Badger
Full Member
Posts: 132
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
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: 621
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: 132
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
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: 621
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: 728
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