Written November 2024
Since property sheets effectively have only one data item per header item, it is sometimes useful to place multiple property sheets side-by-side as a way of displaying additional attributes associated one-to-one with the original items. In such a case, you can synchronize the vertical scrolling between the trees by setting the XTR.SYNCCTLNO field (in the XTRCTL parameter) to connect the 'scroll master' tree to the 'scroll slave'. Note that the 'master' and 'slave' terms here only refer to the fact that vertical scrolling the 'master' causes the 'slave' to scoll. In every other respect the trees are independent.
To implement, plug the XTR.CTLNO (XTREE control number) of the slave tree, plus one, into the new XTR.SYNCCTLNO field in the XTRCTL structure. The +1 is required since zero is a valid control number, but it makes more sense to allow the default zero to indicate the feature is not being enabled. Assuming that you are using the typical auto-assignment technique for control numbers, by pre-initializing XTR.CTLNO to -1, this would require you to create the slave tree first (in order to get its assigned XTR.CTLNO) and then plug that in to the master tree's XTR.CTLNO.
The mechanism can be extended to a third tree by plugging it's XTR.CTLNO (+1) into the second tree's XTR.SYNCCTLNO. But do not create a circle by linking a slave back to its master (an infinite message loop will result).
History
November 2024, A-Shell 7.0.1765: Add ability to sync vertical scrolling.