TAdvMemo Bookmarks function

function bookmarks in TAdvMemo always returns -1 no matter how many bookmarks are set in this object. Could you please check and fix this problem.


Thanks,

There is no function bookmarks.
Are you referring to the property AdvMemo.Bookmarks[Index: integer]: integer ?


Yes

I cannot see a problem here.
When setting bookmark 1 and bookmark 2, I can retrieve these after setting.

Test code:


procedure TForm1.Button1Click(Sender: TObject);
begin
  advmemo1.Bookmarks[0] := 5;
  advmemo1.Bookmarks[1] := 8;
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  listbox1.Items.Add(inttostr(advmemo1.Bookmarks[0]));
  listbox1.Items.Add(inttostr(advmemo1.Bookmarks[1]));
end;