Datagrid: multiple hilites
Trevor DeVore
lists at mangomultimedia.com
Fri Oct 16 21:03:25 EDT 2009
On Oct 16, 2009, at 6:58 PM, David Bovill wrote:
> command tweet_ToggleHilite
>> put the dgControl of me into dataGrid
>> if the dgProp ["auto hilite"] of dataGrid is false then
>> put the dgLine of me into myIndexNum
>> put the dgHilitedIndex of dataGrid into indexNums
>> set the wholematches to true
>> put itemOffset (myIndexNum, indexNums) into foundItem
>> if foundItem = 0 then
>> if indexNums is empty then
>> put myIndexNum into indexNums
>> else
>> put comma & myIndexNum after indexNums
>> end if
>> else -- already hilited
>> delete item foundItem of indexNums
>> end if
>> sort numeric items of indexNums
>>
>> lock screen
>> put the dgControl of me into dataGrid
>> put the dgVScroll of dataGrid into someScroll
>> set the dgHilitedindex of dataGrid to indexNums
>> put indexNums
>> set the dgVScroll of dataGrid to someScroll
>> unlock screen
>> end if
>> end tweet_ToggleHilite
You are using dgLine with myIndexNum. That should be dgIndex. Does
that fix the problem?
--
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Releasable Revolution Resources for Developers: http://revolution.bluemangolearning.com
More information about the use-livecode
mailing list