Page 1 of 1
scrollbar position on data grid
Posted: Thu Oct 01, 2015 11:08 pm
by jalz
Hey Guys,
Whats the command to get and set the scrollbar position of the of a data grid?
I've tried the following, but not had any luck as it returns 0
put the scroll of group "dg_data" into tScrollPosition
put the vscroll of group "grp_scrollbar" into tScrollPosition
Thanks
Jalz
Re: scrollbar position on data grid
Posted: Thu Oct 01, 2015 11:53 pm
by Klaus
Hi Jalz,
please get your copy of the datagrid docs here:
http://lessons.runrev.com/m/datagrid
The relevant parts:
...
dgHScroll
- get the dgHScroll
- set the dgHScroll to of group "DataGrid" pInteger
- Get/set the horizontal scroll of the data grid. This only applies to tables as forms do not scroll horizontally.
dgHScrollPercent
- get the dgHScrollPercent
- set the dgHScrollPercent of group "DataGrid" to pPercent
- Get/set the percentage of the horizontal scroll. A number between 0 and 1. This only applies to tables as forms do not scroll horizontally.
...
dgVScroll
- get the dgVScroll
- set the dgVScroll of group "DataGrid" to pInteger - Get/set the vertical scroll of the data grid.
dgVScrollPercent
- get the dgVScrollPercent
- set the dgVScrollPercent of group "DataGrid" to pPercent
- Get/set the percentage of the vertical scroll. A number between 0 and 1.
...
Best
Klaus
Re: scrollbar position on data grid
Posted: Fri Oct 02, 2015 6:49 am
by jalz
Thanks Klaus, forgot the datagrid had its own api...
Jalz
Re: scrollbar position on data grid
Posted: Mon Jan 02, 2017 4:33 pm
by mrcoollion
Even though it is obvious there is a small typo in the documentation which is:
set the dgHScroll to of group "DataGrid" pInteger
should be
set the dgHScroll of group "DataGrid" to pInteger
Regards,
Paul