Slightly odd behaviour of TreeListCtrl

Frank Millman wrote:

Hi all

I have a TreeListCtrl. After setting up the tree, and before
control is passed to the user, I 'select' one of the items.
It is correctly highlighted, and EVT_TREE_SEL_CHANGED is
correctly triggered.

However, the first time the user uses the arrow keys to move
up or down the tree, it does not react as expected. The
actual behaviour differs depending on which key you press -

    UP - it does nothing
    DOWN - it moves to the root item
    RIGHT - it moves up one
    LEFT - it collapses the tree

After posting this, I realised that it is fairly obvious what is happening.
All these are consistent if the tree thinks that the currently selected item
is 'root'.

Frank