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.