Можно сделать так
X++:
#define.TVM_ENSUREVISIBLE(0x1100+20)
#winapi
...
if (treeControl.getSelection())
{
winapi::sendMessageEx(treeControl.hWnd(), #TVM_ENSUREVISIBLE, 0, treeControl.getItem(treeControl.getSelection()).idx());
winapi::setScrollPos(treeControl.hWnd(), #SB_HORZ, 0);
}