Proposed update to datagrid library
Bob Sneidar
bobsneidar at iotecdigital.com
Wed Jul 31 16:34:41 EDT 2024
Not nearly as sexy, but it does what I need it to.
getProp dgNextIndex [tIndex]
put the dgIndexes of me into tIndexes
put itemOffset(tIndex, tIndexes) into tItem
if tItem = the the number of items of tIndexes then
put item tItem of tIndexes into tIndex
else
put item tItem +1 of tIndexes into tIndex
end if
return tIndex
end dgNextIndex
getProp dgPrevIndex [tIndex]
put the dgIndexes of me into tIndexes
put itemOffset(tIndex, tIndexes) into tItem
if tItem = 1 then
put item tItem of tIndexes into tIndex
else
put item tItem -1 of tIndexes into tIndex
end if
return tIndex
end dgPrevIndex
> On Jul 31, 2024, at 12:20 PM, Paul Dupuis via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> My Datagrid skills are not great, but i thought the thedgIndexes ofgroup"DataGrid" The Dictionary says "Returns the internal list of indexes in the order in which they appear in the data grid"
> You also have the dgIndexOfLine[pLine] to get the index of the line (hilited line or next line or whatever). Then find the index returned by dgIndexOfLine in the dgIndexes, which will return a line number in the list of indexes and then add 1 to that to the the line in the dgIndexes of the next index.
>
>
More information about the use-livecode
mailing list