Datagrid Selection Toggle

Bob Sneidar bobsneidar at iotecdigital.com
Fri Jan 30 15:35:33 EST 2015


Anyone ever want to have data grid table selections toggle without making the user hold the shift key down?

on selectionChanged theSelectedItem
   put the savedHilitedLines of me into theHilitedLines



   if theSelectedItem is among the items of theHilitedLines then
      set wholeMatches to true
      put itemOffset(theSelectedItem, theHilitedLines) into theFoundItem
      delete item theFoundItem of theHilitedLines
      set the dgHilitedLines of me to theHilitedLines
   end if



   set the savedHilitedLines of me to the dgHilitedLines of me
end selectionChanged

Bob S



More information about the use-livecode mailing list