DataGrid - move Scrollbar by script
zryip.theslug at gmail.com
Thu May 13 17:35:10 EDT 2010
2010/5/13 <LunchnMeets at aol.com>:
> Hi everyone,
> There are a lot of uses for datagrids. I'm having a little trouble fully
> getting into the operation of them though.
> How can I move the vertical scrollbar from within a script? What I have is
> an alphabetical list as one of the datagrid columns. I want to type a
> character and have the grid scroll so that the first listing shown is the first
> one with that character. It's probably a keyDown handler but that's as far as
> I got. I'm sure it's possible, but I can't figure it out. Your help is
> appreciated very much. Many times I don't know how I manage without this list as
> a resource.
> Joe in Orlando
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
The dgHilitedLines property of a Data Grid goes automatically to the
first line you pass as parameter. If necessary it scrolls the vertical
scrollbar to reach the line.
set the dgHilitedLine of myDataGrid to pTheLine
where pTheLine is the line to select.
All you have to do here, is pass to this property the number of the
line to display.
With the Data Grid you can use the FindLine for exact match searching:
However, for partial matches you have to write your own handler.
Have a look to the search topic of the library I prepare for the Data Grid:
go to url "http://www.aslugontheroad.co.cc/demo/DG_Lib_Demo-Dictionary.rev"
It could inspire you some ideas.
-Zryip TheSlug- wish you the best! 8)
More information about the Use-livecode