Datagrid Scrollbar

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
Kaubs
Posts: 124
Joined: Wed Jun 29, 2011 3:55 am

Datagrid Scrollbar

Post by Kaubs »

Hey guys,

I am attempting to scroll a data grid using buttons. Does anyone know how to interact with "dgVScroll" to scroll up or down?
I cannot seem to find a script way of doing this and am attempting to avoid using the built in data grid scroll bars.

Thanks!

Kaubs
sturgis
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1685
Joined: Sat Feb 28, 2009 11:49 pm

Re: Datagrid Scrollbar

Post by sturgis »

Found this information.
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.
Source: http://lessons.runrev.com/s/lessons/m/d ... a-Grid-API

Love that you can work with %.

For a test run I did "set the dgvscrollpercent of group "myGroup" to .5" from the message box, and it worked like a charm.
Kaubs
Posts: 124
Joined: Wed Jun 29, 2011 3:55 am

Re: Datagrid Scrollbar

Post by Kaubs »

Great! Thanks for the find. I will see what I can do with that and share what I find if it works well.
Post Reply