XTR.TARGET...

XTR.TARGETROW and XTR.TARGETCOL are used in conjunction with XTR.XROW and XTR.XCOL and cell editing to identify the cell that should next get the focus, or a click on which was responsible for forcing XTREE to exit. If XTR.XVALIDATE = 2 or 3, then this cell should be validated before re-entry. See Typical Cell Editing Scenarios for examples and more information.

When in an XTREE editable cell that requires validation, if you use the mouse on the vertical scroll bar to scroll the row out of view, the returned XTR.TARGETROW value will be set to the top or bottom of the visible range of rows, whichever is closest. This counteracts the "boomerang scroll" effect whereby using the scroll bar when in an editable cell would work only until the mouse was released, after which if XTREE exited for validation, when the app returned, the XTR.TARGETROW would still be pointing to the cell that was being edited, thus snapping the scroll operation back to the original position.

Note that when entering a non-editable multi-select tree, the XTR.TARGETROW establishes which row gets the focus. The focused row will be identified by a dotted line around it, and is not necessarily selected nor even visible, but when you use the Down-arrow, the focus and selection will move to the next row below the one that had the focus. XTR.TOPINDEX works in multi-select mode also, to set the vertical scrolling position. Prior to A-Shell 997.3, the first selected row over-rode the XTR.TOPINDEX.