Is there a way that I can require people to scroll an entire paragraph, like a disclaimer, in order to click on a button to accept and move on?
Professional Software Development Tools
Is there a way that I can require people to scroll an entire paragraph, like a disclaimer, in order to click on a button to accept and move on?
Initially I would say that you would have to use the On Timer event and compare the Paragraph.GetScrollPos with the max value from Paragraph.GetScrollRange. If they match then you know they have scrolled to the bottom of the page and you can then enable the button.
Tigg
TJ-Tigger
"A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
"Draco dormiens nunquam titillandus."
Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine
As Tigger said.
First, you have to find the Max range of the scroll bar in the paragraph with all the text loaded and displayed in the para. Ah, but here's the rub. The up/down arrows in the scroll bar is counted in the total range, so you have to subtract the size of the arrow from the .Max range value. I have found that the size of the scroll arrow is 22.
Then you have to compare the Max-22 to Scroll the present Scroll position
Then, if the scroll bar is at the max position, enable the button.
Try this (replace my object names with your object names)
Page - On Show
Page - On TimerCode:Page.StartTimer(1000)
Code:---this will get a table with the Scroll RAnge. Use .Min or ---.Max to get values tScroll = Paragraph.GetScrollRange("EULA_para", true); ---this will get the present scroll position nScroll = Paragraph.GetScrollPos("EULA_para", true); ---compare position to Max range - 22 pixels if nScroll == tScroll.Max - 22 then ---if it meets the above do Button.SetEnabled("I Agree_btn", true); end