Hey Klaus, thank you for the fast response. I am working with a FORM. Sorry for the confusion, let me try to explain differently. The "put the long id of the target into pTargetField" works great actually in the behavior script, but the card script gives me error when I try to use it.
My main goal: When the user clicks on a certain field (built in the row template) then it will auto-scroll the text of that field (many characters that don't fit in that field) from left to right so the user can see all data in that field.
Situation:
1. I input two records Row 1 and Row 2 with following data.
Row 1 fieldName has = This is a long sentence that the user may read but cannot see the entire sentence.
Row 2 fieldName has = Another bunch of words that the user wants to see in this field and I would like to show with scroll.
2a. When I click row 2 with this code row 1 will autoscroll only. Which I agree with you as it doesn't specify the row.
Code: Select all
on autoScroll pStart,pDuration
lock screen local tScroll,tElapsed
put the millisecs-pStart into tElapsed
put round(aeEaseIn(0,the formattedWidth fld "fieldName",pDuration,tElapsed,2)) into tScroll
set the hScroll of fld "fieldName" to tScroll
unlock screen
if tElapsed < pDuration then
send "autoScroll" && pStart,pDuration to me in 30 millisecs
end if
end autoScroll
2b.When I click row 2 with this code (as I modified the behavior script to pass the parameter) I get the error card "card1": execution error at line 268 (Chunk: error in object expression) near "fieldName", char 44
Code: Select all
on autoScroll pStart,pDuration
lock screen local tScroll,tElapsed
put the millisecs-pStart into tElapsed
put round(aeEaseIn(0,the formattedWidth pTargetField ,pDuration,tElapsed,2)) into tScroll
set the hScroll of pTargetField to tScroll
unlock screen
if tElapsed < pDuration then
send "autoScroll" && pStart,pDuration to me in 30 millisecs
end if
end autoScroll
Your question:
But I still don't see any relation between: field/column clicked in datagrid <-> scroll of you OTHER text field as described in your initial posting!?
What is the difference between clicking e.g "Field1" vs "Field44"?
Hopefully I explained the difference above, basically I am unsure on how to make the card script handler act only on the field I click on. So in your example, if I click Field4 only Field1 would autoscroll.
Thanks