Good morning, I've advanced a little on how to put a marker in a RichMemo.
I used the procedure SetParaNumbering(TextStart, TextLen: Integer; const ANumber: TParaNumbering); virtual;
In Text Start I passed RichMemo1.SelStart and in TextLen I passed RichMemo1.SelLength. Now the magic begins, it is in the third parameter that the programmer chooses which marker to use.
Procedure documentation:
https://wiki.freepascal.org/RichMemo#SetParaNumbering
TParaNumStyle = (pnNone, pnBullet, pnNumber, pnLowLetter
, pnLowRoman, pnUpLetter, pnUpRoman, pnCustomChar);
TParaNumbering = record
Style : TParaNumStyle;
Indent : Double;
CustomChar : WideChar;
NumberStart : Integer; // used for pnNumber only
SepChar : WideChar;
ForceNewNum : Boolean; // if true and Style is pnNumber, NumberStart is used for the new numbering
end;
const
SepNone = #0;
SepPar = ')';
SepDot = '.';
Placing a Bullet:
var
styleHighlighter : TParaNumbering;
begin
with styleHighlighter do
begin
Style := pnBullet;
Indent := 4;
end;
with RichMemo1 do
begin
SetParaNumbering(SelStart, SelLength, styleHighlighter);
end;
Colocando números como marcador:
var
styleHighlighter : TParaNumbering;
begin
with styleHighlighter do
begin
Style := pnNumber;
Indent := 4;
NumberStart := 1;
SepChar := SepDot;
ForceNewNum := True;
InitParaNumber(styleHighlighter, SepDot, 1);
end;
with RichMemo1 do
begin
SetParaNumbering(SelStart, SelLength, styleHighlighter);
end;
When placing numbers as markers, the programmer can change the SepChar. Remember to execute the InitParaNumber procedure to start the order of numbers.
I hope it helped.