Lazarus
Programming => General => Topic started by: pixelink on July 03, 2020, 11:45:44 pm
Title:
[DONE] RichMemo Bullets
Post by:
pixelink
on
July 03, 2020, 11:45:44 pm
Hi,
Reading this page on Bullets/Numbering.
https://wiki.freepascal.org/RichMemo
I can't ssem to figure out how exactly the code needs to be done.
This is what I have, but get error on pn:= line
Code: Pascal
[Select]
[+]
[-]
var
pn
:
TParaNumbering
;
begin
pn
.
Style
=
pnNumber
;
//<------ ERROR
txtNote1
.
SetParaNumbering
(
txtNote1
.
SelStart
,
txtNote1
.
SelLength
,
pn
)
;
txtNote1
.
SetFocus
(
)
;
Any help would be appreciated
Title:
Re: RichMemo Bullets
Post by:
speter
on
July 04, 2020, 02:41:04 am
I've never used richmemo, so I might be wrong... ;)
Try putting square brackets around the "pnNUmber"; like
Code: Pascal
[Select]
[+]
[-]
pn
.
Style
:
=
[
pnNumber
]
;
Also note that I added a colon before the equal (to make it an assign operator).
Finally, I don't think you don't need the empty brackets on line 6.
cheers
S
Title:
Re: RichMemo Bullets
Post by:
paweld
on
July 04, 2020, 07:11:07 am
You must initialize TParaNumber structure:
Code: Pascal
[Select]
[+]
[-]
var
pn
:
TParaNumbering
;
begin
IntParaNumbering
(
pn
)
;
pn
.
Style
=
pnNumber
;
txtNote1
.
SetParaNumbering
(
txtNote1
.
SelStart
,
txtNote1
.
SelLength
,
pn
)
;
txtNote1
.
SetFocus
(
)
;
end
;
Title:
Re: RichMemo Bullets
Post by:
pixelink
on
July 04, 2020, 10:45:20 am
I found a discussion dedicated to this control after I wrote this thread.
I made a new thread in there...
https://forum.lazarus.freepascal.org/index.php/topic,50428.0.html
Thanks
TinyPortal
© 2005-2018