Frequently Asked Component Specific Questions
Options | 
		
| 		
			
				 Display all FAQ items  | 
		
		
Displaying items 1 to 1 of 1, page 1 of 1
<< previous next >>

TAdvMemoHow to use bookmarks
You can add a bookmark on a specific line with:
advmemo.Bookmarks[bookmarkindex] := linenumber;
advmemo.Bookmarks[bookmarkindex]: integer;
advmemo.BookmarkIndex[bookmarkindex]: integer
Example:
procedure TForm1.FormCreate(Sender: TObject); begin
   // load some file
   advmemo1.Lines.LoadFromFile('somefile.txt');
   // set first bookmark at line 100
   advmemo1.Bookmarks[0] := 100;
   // set second bookmark at line 200
   advmemo1.Bookmarks[1] := 200;
end;
 // code to move to the first bookmark, i.e. jump to line 100; begin
  advmemo1.GotoBookmark(0);
end;