Page 1 of 1

scroll a text field up/down with buttons

Posted: Tue Sep 29, 2015 7:01 pm
by sms5138
Hi everyone,

I'm trying to create a button that will scroll/move a normal text field up/down using buttons instead of a scroll bar on the side...

I've tried the following code... thinking i'm on the right track, but no luck so far...

Code: Select all

on mouseUp
   set the thumbPosition of field "read" to 1
end mouseUp
and

Code: Select all

on mouseUp
   set the thumbPosition of scrollbar 1 to 1
end mouseUp
which seem to work great on a data grid that is present, but i can't seem to get it to figure out how to manipulate the text field.... I thought i'd see if anyone had any suggestions on a good way to do this...

Thank you in advance for any assistance you can provide!

-Sean

Re: scroll a text field up/down with buttons

Posted: Tue Sep 29, 2015 7:07 pm
by Klaus
Hi Sean,

you want to set the SCROLL (or VSCROLL) of your field (in pixel):
...
set the scroll of fld 1 to 100
...
"thumbpos" is in fact a scrollbar property, but not of the scrollbar of a field!


Best

Klaus

Re: scroll a text field up/down with buttons

Posted: Tue Sep 29, 2015 7:34 pm
by sms5138
perfect!

Thanks so much Klaus!

-Sean