Tech Tip: How to programmatically retrieve the position of the scrollbars
PRODUCT: 4th Dimension | VERSION: 2004.1 | PLATFORM: Mac & Win
Published On: May 26, 2005
With the new 4th Dimension 2004.1, it is now possible to programmatically retrieve the position of the scrollbars. To achieve this, use the command “Get listbox information” and pass in the “Positon listbox hor scrollbar” or “Position listbox ver scrollbar”. For example; given a list box containing rows with height of 20 pixels each, by executing the command:
$scroll:=Get listbox information(*;”Listbox”;Position listbox ver scrollbar)
So, for instance, if $scroll return 200, you can conclude that the 11th row is the first row. The reason for this is 200/20=10—the 10th rows are hidden.