Use double buffer to avoid flickering of the tree view