[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'ComCtrls' (#lcl)

# TCustomTreeView.DefaultTreeViewSort

DefaultTreeViewSort - returns result of string comparison between names of Node1 and Node2

## Declaration

Source position: comctrls.pp line 2647

`public function TCustomTreeView.DefaultTreeViewSort(`
`Node1: TTreeNode;`
`Node2: TTreeNode`
`):Integer;`

## Description

DefaultTreeViewSort - returns result of string comparison between names of Node1 and Node2

DefaultTreeViewSort compares the text of two TreeNodes and returns the following result:

< 0
  if Node1.Text<Node2.Text.
0
  if Node1.Text=Node2.Text.
> 0
  if Node1.Text>Node2.Text.

The comparision takes into account Ansi characters, i.e. it takes care of strange accented characters. Contrary to AnsiCompareText, the comparision is case sensitive.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.