I'm trying to figure out how to get and set paragraph indents.
I'm using RichMemo on a Mac.
If I'm reading the docs correctly, the code below should work.
It should initialize the parametric variables, set a value for met firstline, apply it to the text in the editor, the second parametric is used to get the values and display firstline in the statusbar.
I get no errors, but here's what happens when I run it:
met.FirstLine is changed to 30 (Checked by outputting to statusbar at the end) but the text doesn't change.
met2.FirstLine shows 0 at the end, and has not changed since initialization.
I do see in the docs that some things aren't working for Mac, but nothing mentioned for parametric.
Am I missing something, or did I find a bug?
procedure TEbookSettingsForm.ParagraphScrollbarChange(Sender: TObject);
var
met, met2: TParaMetric;
begin
InitParaMetric(met);
InitParaMetric(met2);
MainForm.Editor.GetParaMetric(0, met);
met.FirstLine := 30;
MainForm.Editor.SetParaMetric(0, Length(MainForm.Editor.Lines.Text), met);
MainForm.Editor.GetParaMetric(0, met2);
MainForm.StatusBar.SimpleText := FloatToStr(met2.FirstLine);
//MainForm.Ebook.paragraphIndent := ParagraphScrollbar.Position;
//ParagraphScrollValueLabel.Caption := IntToStr(MainForm.Ebook.paragraphIndent);
end;