DataGrid question...
Terry Judd
terry.judd at unimelb.edu.au
Mon Mar 30 00:04:16 EDT 2020
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
On 30/3/20, 2:57 pm, "use-livecode on behalf of Pi Digital via use-livecode" <use-livecode-bounces at lists.runrev.com on behalf of use-livecode at lists.runrev.com> wrote:
Ah Bob. You misunderstand. We are asking in reference to the table field, not DG. Finding the index in data grid is very easy indeed. In a table field, it so much as I was to understand. But apparently there is some magic I’ve missed somewhere and perhaps I’m the only one. Do you know what it is?
Sean Cole
Pi Digital
> On 30 Mar 2020, at 04:40, Bob Sneidar via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> on mouseUp
> put the mouseControl into tControl
> put the long id of tControl into tID
> put the short name of tControl into tName
> end mouseUp
>
> The short name will reveal the column number. The dgHilitedLine will give you the line.
>
>> On Mar 29, 2020, at 8:37 PM, Bob Sneidar via use-livecode <use-livecode at lists.runrev.com> wrote:
>>
>> The mouseControl!
>>
>> Bob S
>>
>> On Mar 29, 2020, at 8:35 PM, Pi Digital via use-livecode <use-livecode at lists.runrev.com<mailto:use-livecode at lists.runrev.com>> wrote:
>>
>> Hi Jerry
>>
>> Thanks for the heads up about Bernd’s code. But I was interested in learning how to get the cell index of a table field when clicked as we are told it was solved a ‘long time’ ago. That makes it seem that it is general knowledge and I’m a dunce for not being aware of it (which is very possible). If you’ve got any pointers you know of that can steer me right I’d appreciate it.
>>
>> Sean Cole
>> Pi Digital
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list