flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From modjkl...@comcast.net
Subject Re: how enable checkbox when scroll to bottom of Spark TextArea?
Date Tue, 10 Mar 2015 13:05:10 GMT
Thank you so much! 

----- Original Message -----

From: "Gaël Chrétien" <gael.chretien@gmail.com> 
To: users@flex.apache.org 
Sent: Tuesday, March 10, 2015 12:50:16 AM 
Subject: Re: how enable checkbox when scroll to bottom of Spark TextArea? 


Here is a small implemntation : 
There is a little problem : the event is distributed "before" the scroll, 
so, you can add a blank line to your texarea, and check if the scroll 
percentage is greater than 99% ;) 

<?xml version="1.0" encoding="utf-8"?> 
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
creationComplete="init(event)" height="768" width="1024"> 
import mx.events.FlexEvent; 
import mx.events.PropertyChangeEvent; 

protected function handle(event:PropertyChangeEvent):void 
_chx.selected = (_sc.scroller.verticalScrollBar.value == 
protected function init(event:FlexEvent):void 
for (var i:Number=1; i<20 ;i++) 
_sc.text += 'Alea Jacta Est\n'; 
<s:TextArea id="_sc" /> 
<s:CheckBox id="_chx" selected="false" /> 


2015-03-09 20:07 GMT+01:00 <modjklist@comcast.net>: 

> I'm trying to implement a clickwrap agreement wherein a user must scroll 
> to the bottom of a spark TextArea or RichEditableText box in order to 
> enable a checkbox that must be selected to a Terms of Service (TOS) 
> contract. This ensures the TOS at least passed by the user's eyes before 
> agreeing to it (of course, we can never be sure the user actually read it). 
> What can I use to determine that user has scrolled to the bottom of the 
> text area, so that I can enable the checkbox? Thanks for any comments. 

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message