XTR.TOPINDEX

Updated August 2010

This field may be used to force the initial display vertical scroll position. To activate the feature, set XTR.TOPINDEX to the desired first visible row (1=first). Once set, it will be updated on exit, so that a subsequent re-entry will enter in the same position. To disable the feature, set it to 0. Note that this will override the default logic which normally tries to position the vertical scroll so that the initially selected row is visible.

XTR.TOPINDEX may be set to -1 on input in order to tell XTREE to return the new topindex on exit, but not to attempt to set it on entrance. This applies only when re-entering an existing tree with XTROP_RESELECT or XTROP_REPLACE with XTF_NOREDRAW set, and with XTR.TARGETROW=0.

XTR.TOPINDEX is not returned relative to an inactive XTREE when the inactive tree is clicked while another tree has the focus. This was conflicting with the new-and-improved logic for handling clicks on inactive trees. The optimum way to respond to a click event on an inactive XTREE is to set XTR.TOPINDEX, XTR.TARGETROW, and XTR.TARGETCOL all to 0 before entering the clicked-on tree (using XTROP_RESELECT).