Page 1 of 1

Scrolling two overlying & see-through fields?

Posted: Sat Nov 12, 2011 10:53 pm
by Maxiogee
A scrolling field (field "ListAns") contains a list of numbers from 1 to 100 (one per line), some in red and some in black.
Overlying this field is another (field "UserAns") which non-opaque and into which the program will enter solutions a user generates [in a different field … put field "Solution" into line (first word of field "Solution") of field "UserAns"] for some of these numbers - the black ones. The red ones are there to show the user they do not need to find answers to match these numbers.

The text in field "UserAns" will be blue. The user will know by looking through the field which answers they have yet to generate, as their blue text will mask the original black. In the stack's many cards the red numbers will vary from card to card.

How can I make the two fields scroll in tandem so that when the topmost field's scrollbar is moved, this is replicated in the lower field?

Re: Scrolling two overlying & see-through fields?

Posted: Sat Nov 12, 2011 11:32 pm
by Klaus
Hi Maxiogee,

put this into the script of the field "UserAns":

Code: Select all

on scrollbardrag
  set the scroll of fld "ListAns" to the scroll of me
end scrollbardrag
Et voila, they scroll "in sync" :D


Best

Klaus

Re: Scrolling two overlying & see-through fields?

Posted: Sun Nov 13, 2011 10:26 am
by Maxiogee
Thank you.

That was quick and painless.

Re: Scrolling two overlying & see-through fields?

Posted: Sun Nov 13, 2011 10:29 am
by Klaus
:)