KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
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
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

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.