### Bookstore

 Computer Math and Games in Pascal (preview) Lazarus Handbook

### Author Topic: [DONE] RichMemo Bullets  (Read 346 times)

• Hero Member
• Posts: 1233
##### [DONE] RichMemo Bullets
« on: July 03, 2020, 11:45:44 pm »
Hi,

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][+][-]
1. var
2.   pn : TParaNumbering;
3. begin
4.   pn.Style = pnNumber;    //<------ ERROR
5.   txtNote1.SetParaNumbering( txtNote1.SelStart, txtNote1.SelLength,pn);
6.   txtNote1.SetFocus();

Any help would be appreciated
« Last Edit: July 04, 2020, 10:45:35 am by pixelink »
Can't Type - Forgetful - Had Stroke = Forgive this old man!

LAZ 2.08 •  VSSTUDIO(.Net) 2019 • Win10 • 16G RAM • Nivida GForce RTX 2060

#### speter

• New member
• Posts: 5
##### Re: RichMemo Bullets
« Reply #1 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][+][-]
1.   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

#### paweld

• Full Member
• Posts: 212
##### Re: RichMemo Bullets
« Reply #2 on: July 04, 2020, 07:11:07 am »
You must initialize TParaNumber structure:
Code: Pascal  [Select][+][-]
1. var
2.   pn : TParaNumbering;
3. begin
4.   IntParaNumbering(pn);
5.   pn.Style = pnNumber;
6.   txtNote1.SetParaNumbering( txtNote1.SelStart, txtNote1.SelLength,pn);
7.   txtNote1.SetFocus();
8. end;
Best regards
paweld

• Hero Member
• Posts: 1233
##### Re: RichMemo Bullets
« Reply #3 on: July 04, 2020, 10:45:20 am »
I found a discussion dedicated to this control after I wrote this thread.