event handling on tree control