Sign in Join
FPDoc Onlineexperiment

TCustomBufDataset.CompareBookmarks function

Member of TCustomBufDatasetpublicIn unit BufDataset

Gets the relative sort order for the specified Bookmarks.

Declaration

pascal
function CompareBookmarks(Bookmark1: TBookMark; Bookmark2: TBookMark)
: LongInt; override

Arguments

Bookmark1

Bookmark used in the comparison.

Bookmark2

Bookmark used in the comparison.

Function result

Relative sort order for the specified bookmarks.

Description

CompareBookmarks is an overridden LongInt function used to get the relative sort order for the specified Bookmarks. CompareBookmarks re-implements the method defined in the ancestor class.

The return value indicates the relative sort order for the compared bookmark values, and uses the following values and meanings:

0
Compared bookmarks have the same value
1
Bookmark1 is not assigned, or Bookmark1 occurs after Bookmark2 in the index
-1
Bookmark2 is not assigned, or the current index has not been assigned (default value), or Bookmark1 occurs before Bookmark2 in the index

When the CurentIndexBuf property is assigned, its CompareBookmarks method is used to compare the bookmarks and get the return value for the method.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.