mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-08 13:39:07 +02:00
parent
8f3ab8527b
commit
d66de2be79
@ -111,11 +111,18 @@ type
|
||||
|
||||
type
|
||||
|
||||
{ TBMStringList }
|
||||
|
||||
TBMStringList = class (TStringList)
|
||||
protected
|
||||
function DoCompareText(const s1,s2 : string) : PtrInt; override;
|
||||
end;
|
||||
|
||||
{ TBookmarkList }
|
||||
|
||||
TBookmarkList=class
|
||||
private
|
||||
FList: TStringlist;
|
||||
FList: TBMStringList;
|
||||
FGrid: TCustomDbGrid;
|
||||
function GetCount: integer;
|
||||
function GetCurrentRowSelected: boolean;
|
||||
@ -3463,7 +3470,7 @@ constructor TBookmarkList.Create(AGrid: TCustomDBGrid);
|
||||
begin
|
||||
inherited Create;
|
||||
FGrid := AGrid;
|
||||
FList := TStringList.Create;
|
||||
FList := TBMStringList.Create;
|
||||
FList.CaseSensitive:=True;
|
||||
FList.Sorted:=True;
|
||||
end;
|
||||
@ -3528,6 +3535,19 @@ begin
|
||||
FGrid.Invalidate;
|
||||
end;
|
||||
|
||||
{ TBMStringList }
|
||||
|
||||
function TBMStringList.DoCompareText(const s1, s2: string): PtrInt;
|
||||
begin
|
||||
if Length(s1)<Length(s2) then
|
||||
result := -1
|
||||
else
|
||||
if Length(s1)>Length(s2) then
|
||||
result := 1
|
||||
else
|
||||
result := CompareMemRange(@s1[1],@s2[1], Length(s1));
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I lcl_dbgrid_images.lrs}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user