property Edit.Bookmark(Index as Long) as Boolean
Adds or removes a bookmark.

TypeDescription
Index as Long A long expression that indicates the index of line being bookmarked. The Index parameter is 1 based. The first line in the control is 1.
Boolean A boolean expression that indicates the state of the line's bookmark.

Use the Bookmark property to define programmatically bookmarks for a specified line.  The BookmarkChange event occurs when user changes the bookmarks for lines. The CTRL + F2 key places or erases the current line's bookmark. The F2 key moves the current line to the next bookmarked line. The Shift + F2 key moves the current line to the previous bookmarked line. Use the BookmarkWidth property to show the control's bookmarks header bar. Use the ClearBookmarks method to clear all bookmarks in the control. Use the BookmarksList property to retrieve the list of line that has a bookmark. Use the BookMarkBackColor property to specify the bookmark's header background color. Use the NextBookmark method to move the cursor to the next bookmark. Use the PrevBookmark method to move the cursor to the prior bookmark.

The following VB sample bookmarks or un-bookmarks the current line:

With Edit1
        .Bookmark(.CaretLine) = Not .Bookmark(.CaretLine)
End With

The following C++ sample bookmarks or un-bookmarks the current line:

m_edit.SetBookmark( m_edit.GetCaretLine(), !m_edit.GetBookmark(m_edit.GetCaretLine() ) );

The following VB.NET sample bookmarks or un-bookmarks the current line:

With AxEdit1
    .set_Bookmark(.CaretLine, Not .get_Bookmark(.CaretLine))
End With

The following C# sample bookmarks or un-bookmarks the current line:

axEdit1.set_Bookmark( axEdit1.CaretLine, !axEdit1.get_Bookmark(axEdit1.CaretLine ) );

The following VFP sample bookmarks or un-bookmarks the current line:

With thisform.Edit1.Object
	.Bookmark(.CaretLine) = !.Bookmark(.CaretLine)
endwith