Recent

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

pixelink

  • Hero Member
  • *****
  • Posts: 1260
[DONE] RichMemo Bullets
« 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][+][-]
  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.2.0 •  VSSTUDIO(.Net) 2022 • Win10 • 16G RAM • Nvida GForce RTX 2060

speter

  • Sr. Member
  • ****
  • Posts: 345
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
I climbed mighty mountains, and saw that they were actually tiny foothills. :)

paweld

  • Hero Member
  • *****
  • Posts: 970
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 / Pozdrawiam
paweld

pixelink

  • Hero Member
  • *****
  • Posts: 1260
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.


I made a new thread in there...
https://forum.lazarus.freepascal.org/index.php/topic,50428.0.html

Thanks
Can't Type - Forgetful - Had Stroke = Forgive this old man!
LAZ 2.2.0 •  VSSTUDIO(.Net) 2022 • Win10 • 16G RAM • Nvida GForce RTX 2060

 

TinyPortal © 2005-2018