PDA

View Full Version : tabbing on a long form - newbie


hee2hee
11-03-2006, 08:26 PM
I created a long form with a scroll bar.

The form was created dynamically with textbox, combobox, checkbox ... etc. with a ordered index.
the tabs works fine.

How do I make the form to auto scroll down if it tabs out of the view?

or better yet, how to find the postion on the curect focused form field object, theFocusedObject._y when i tab thru them?




var keyListener:Object = new Object();
keyListener.onKeyDown = function()
{
if (Key.isDown(Key.TAB))
{
// current active form object (textfield/checkbox/comboBox ...) showing below the form
if (theFocusedObject._y >myDisplayWindow.height)
{
// scrolling my form down
myInnerForm._y += myDisplayWindow.height;
}
}
};
Key.addListener(keyListener);