Lazarus
Programming => Packages and Libraries => RichMemo => Topic started by: bigeno on December 06, 2017, 08:41:44 am
Title:
Convert to plain text
Post by:
bigeno
on
December 06, 2017, 08:41:44 am
I've problem with convert rtf to text from Richmemo.
I just try to create richmemo load rtf and get text but maybe its wrong.
Code: Pascal
[Select]
[+]
[-]
debugln
(
'rtf source='
+
s
)
;
Rich
:
=
TRichMemo
.
Create
(
nil
)
;
try
Rich
.
Rtf
:
=
s
;
Result
:
=
Rich
.
Text
;
debugln
(
Result
)
;
finally
Rich
.
Free
;
end
;
I'm getting empty variable.
How can I do this ?
Title:
Re: Convert to plain text
Post by:
bigeno
on
December 06, 2017, 09:14:04 am
Ok, nvm, I found the problem, TRichMemo need Parent assigned.
Code: Pascal
[Select]
[+]
[-]
Rich
:
=
TRichMemo
.
Create
(
nil
)
;
Rich
.
Visible
:
=
false
;
Rich
.
Parent
:
=
Form
;
TinyPortal
© 2005-2018