Page 1 of 1
Scrolling field relative vScroll setting
Posted: Wed Sep 07, 2016 2:39 pm
by cogpsyc
I have a scrolling field that users type text into. Currently, if users input more text than can be seen in the size of the field they have to stop typing and manually move the thumbposition of the vScroll down to see what they are typing. I would like for the vScroll/thumbposition of the vScroll to reset itself automatically so that users do not have to manually move the thumb position to see what they are typing. I know this must be possible but I have not found the answer yet. ... using the line number strategy to reset the vScroll does not work because users' input is one continuous (wrapped) line of text. Any hints?
Re: Scrolling field relative vScroll setting
Posted: Wed Sep 07, 2016 2:54 pm
by Klaus
Hi cogpsych,
1. welcome to the forum!
2. I used something like this in the fields script in the past and looks like this still works:
Code: Select all
on keyup tk
## Instead of calculating the neccessary scroll from the fields content & its line height
## I set the scroll to some laughable number and LC does not complain :-D
set the scroll of me to 100000000
pass keyup
end keyup
Best
Klaus
Re: Scrolling field relative vScroll setting
Posted: Wed Sep 07, 2016 3:44 pm
by FourthWorld
The behavior described in the OP should be automatic. It has been on the platforms I've deployed to for many years.
cogpsych, what OS are you seeing this on, and in which version of LC?
Re: Scrolling field relative vScroll setting
Posted: Wed Sep 07, 2016 4:41 pm
by Klaus
Hi Richard,
The behavior described in the OP should be automatic.
it does, but not completely, see attached screenshot from LC 8.02 on OS X 10.11.6.
Best
Klaus

- autoscrolling.jpg (29.26 KiB) Viewed 3430 times
Re: Scrolling field relative vScroll setting
Posted: Wed Sep 07, 2016 5:37 pm
by FourthWorld
Bug. I'd report it so it can be fixed before 8.1 goes final.
Re: Scrolling field relative vScroll setting
Posted: Thu Sep 08, 2016 12:58 pm
by cogpsyc
I am using an older version Livecode 5.5.5
Re: Scrolling field relative vScroll setting
Posted: Thu Sep 08, 2016 1:02 pm
by cogpsyc
Thanks Klaus the clip of code you shared worked perfectly!