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
Access violation with use...
by
Martin_fr
[
Today
at 12:55:49 pm]
Best way to include lots ...
by
domasz
[
Today
at 12:36:51 pm]
[SOLVED] How to send line...
by
Slawek
[
Today
at 12:08:07 pm]
IDE freezing on opening p...
by
wp
[
Today
at 12:06:59 pm]
structured types structur...
by
TRon
[
Today
at 12:04:03 pm]
Lazarus for RISC OS
by
TRon
[
Today
at 11:47:16 am]
Lazarus 2.2.6 can't insta...
by
wp
[
Today
at 11:36:29 am]
Changes in "Search Result...
by
Martin_fr
[
Today
at 11:24:46 am]
Cannot connect to MariaDB...
by
TRon
[
Today
at 11:10:35 am]
[solved] FPCUpdeluxe erro...
by
TRon
[
Today
at 10:36:10 am]
Something wrong when i cl...
by
TRon
[
Today
at 09:53:10 am]
A flag problem? [SOLVED]
by
Badger
[
Today
at 09:33:21 am]
program locks up using se...
by
TRon
[
Today
at 09:12:52 am]
CoWaitForMultipleObjects ...
by
Awkward
[
Today
at 08:31:26 am]
Small DBMS project and Ho...
by
Zvoni
[
Today
at 08:07:38 am]
python for lazarus
by
Mongkey
[
Today
at 05:40:38 am]
Compiling Lazarus 2.2.6 o...
by
eldonfsr
[
Today
at 04:22:29 am]
Windows on ARM64
by
Wallaby
[
Today
at 01:36:51 am]
Are We Dead Yet?
by
dieselnutjob
[
Today
at 12:58:56 am]
[SOLVED] Notice: procedur...
by
wp
[
Today
at 12:38:12 am]
[SOLVED] What does TSQLCo...
by
Slawek
[June 06, 2023, 11:53:55 pm]
Feature announcement: Fun...
by
Peter H
[June 06, 2023, 11:17:10 pm]
IInterface issues, compil...
by
PascalDragon
[June 06, 2023, 10:27:36 pm]
[RESOLVED] bug in FpWait?
by
PascalDragon
[June 06, 2023, 09:50:06 pm]
Does FPC uses any interme...
by
mercurhyo
[June 06, 2023, 09:27:44 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Page Break in Rich Memo (Read 431 times)
Badger
Full Member
Posts: 138
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: 683
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: 138
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: 683
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: 745
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