DataGrid question...

J. Landman Gay jacque at hyperactivesw.com
Mon Mar 30 02:32:00 EDT 2020


I can't write a test handler right now, but I'm thinking you might be able do something like this:

repeat for each item i in the tabstops of the field:
   if the clickH > i and less than item i+1,
   that's your column

The clickline gives you the row.

On 3/29/20 11:04 PM, Terry Judd via use-livecode wrote:
> This is rough but sort of works...
> 
> on selectionChanged
>     set the itemDel to tab
>     put word 2 of the selectedLine into tRow
>     put word 2 of the selectedChunk into nChar
>     put length(line 1 to tRow-1 of me) into tStart
>     put char tStart+2 to nChar of me into tText
>     put the number of items in tText into tCol
>     put tRow&&tCol
> end selectionChanged
> 


-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list