OS.SendMessage (handle, OS.TVM_SELECTITEM, OS.TVGN_FIRSTVISIBLE, item.handle);
int hItem = item.handle; boolean fixScroll = fixScroll(hItem); if (fixScroll) OS.SendMessage (handle, OS.WM_SETREDRAW, 1, 0); OS.SendMessage (handle, OS.TVM_SELECTITEM, OS.TVGN_FIRSTVISIBLE, hItem); if (fixScroll) OS.SendMessage (handle, OS.WM_SETREDRAW, 0, 0);
public void setTopItem (TreeItem item) {	checkWidget ();	if (item == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);	if (item.isDisposed ()) SWT.error (SWT.ERROR_INVALID_ARGUMENT);	OS.SendMessage (handle, OS.TVM_SELECTITEM, OS.TVGN_FIRSTVISIBLE, item.handle);}