Scroll Bar Problem

Rob Cozens rcozens at pon.net
Thu Jan 29 15:18:07 EST 2004


Hi Glen,

>I have 10 lines being continually placed "into" a field every second.
>
>When I use the horizontal scroll bar it does not stay in the 
>position I set it to...on every update it starts back in its default 
>state (to the far left).
>
>Is there a way I can have it stay where ever I place it while the 
>field is being updated?

on update
   local theXLines
   lock screen
   get the hScroll of field [the target field]
   put theXLines into field [the target field]
   set the hScroll of field [the target field] to it
   unlock screen
   send "update" in 1 second
end update


>
>Also, is there a quick way to sum the second word for the field?
>

function getSum
   put 0 into theTotal
   repeat for each line targetLine of field [the target field]
     add word 2 of targetLine to theTotal
   end repeat
   return theTotal
end getSum
-- 

Rob Cozens
CCW, Serendipity Software Company
http://www.oenolog.net/who.htm

"And I, which was two fooles, do so grow three;
Who are a little wise, the best fooles bee."

from "The Triple Foole" by John Donne (1572-1631)


More information about the use-livecode mailing list