Guest User

Untitled

a guest
Jan 19th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. function CustomSortProc(Node1, Node2: TTreeNode; Data: Longint): Integer; stdcall;
  2. begin
  3. if Data = 0 then
  4. Result:= System.AnsiStrings.AnsiStrIComp(PAnsiChar(AnsiString(Node1.Text)),
  5. PAnsiChar(AnsiString(Node2.Text)))
  6. else
  7. Result:= -System.AnsiStrings.AnsiStrIComp(PAnsiChar(AnsiString(Node1.Text)),
  8. PAnsiChar(AnsiString(Node2.Text)));
  9. end;
  10.  
  11. Node.CustomSort(@CustomSortProc, 0);
Add Comment
Please, Sign In to add comment