ok i see what your asking...
you should be able to do this when the control gets the focus.
set the vPosition = the difference between the form's x value and the controls x value
kinda tricky getting that... you gota use localToGlobal and the back again

var formPoint = {x:yourFormsID.x, y:yourFormsID.y};       
yourFormsID.parent.localToGlobal(formPoint);
var controlPoint= {x:yourControlsID.x, y:yourControlsID.y};
yourControlsID.parent.localToGlobal(podPoint);
var diffPoint = {x:yourFormsID.x - yourControlsID.x, y:yourFormsID.y - yourControlsID.y};
yourFormsID.vPosition = diffPoint.x; 

should work...  should respond to the group and let us know if it works or not or what the final solution was... I can see this coming up a lot.

On 7/20/05, Allen Manning <[EMAIL PROTECTED]> wrote:

Clint,

 

Are you suggesting that I databind to this property against some maths inside of the container?  I guess I could update the vPostion when a tab event fires, but I was hoping for something cleaner if you get my drift.

 

Thanks for your help,

Allen

http://www.prismix.com/

 

 


From: [email protected] [mailto:[email protected]] On Behalf Of Clint Modien
Sent: 20 July 2005 18:19
To: [email protected]
Subject: Re: [flexcoders] Automatic Scrolling via Tab in a Container

 

have a peek @ vPosition


On 7/20/05, Allen Manning <[EMAIL PROTECTED]> wrote:

Hello Flexcoders,

 

I did a bit of research sorry if it has been posted already.  Any idea how can I make a container's view port automatically scroll when I tab to a control outside of the view port?

 

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx=" http://www.macromedia.com/2003/mxml">

 <mx:Panel width="100%" height="100%">

    <mx:Form height="200" vScrollPolicy="auto">

        <mx:TextInput />

        <mx:TextInput />

        <mx:TextInput />

        <mx:TextInput />

        <mx:TextInput />

        <mx:TextInput />

        <mx:TextInput />

        <mx:TextInput />

        <mx:TextInput />

        <mx:TextInput />

    </mx:Form>

   </mx:Panel>

</mx:Application>

 

 

 

Thanks for any help,

Allen

 

http://www.prismix.com/

 

 



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com



YAHOO! GROUPS LINKS

 

 


 

--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.269 / Virus Database: 267.9.2 - Release Date: 19/07/2005

SPONSORED LINKS
Computer software testing Macromedia flex Development
Software developer


YAHOO! GROUPS LINKS




--
Incoming mail is certified Virus Free.

Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.269 / Virus Database: 267.9.2 - Release Date: 19/07/2005


--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.269 / Virus Database: 267.9.2 - Release Date: 19/07/2005




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to