http://www.macromedia.com/go/wish :-)

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Mika Kiljunen
Sent: Thursday, June 02, 2005 12:32 AM
To: [email protected]
Subject: RE: [flexcoders] Fields and focuses

 

I’d say this functionality should be part of the flex environment rather than a user implemented behaviour…?

 

-Mika

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Matt Chotin
Sent: 2. kes�kuuta 2005 10:01
To: [email protected]
Subject: RE: [flexcoders] Fields and focuses

 

You could put focusIn handlers on your TextInputs which would run some form of “ensureVisible” check.

 

function ensureVisible(component, container) : Void

{

  var containerBottom = container.vPosition + container.height;

  var componentBottom = component.y + component.height;

  if (componentBottom > containerBottom)

  {

    container.vPosition += componentBottom – containerBottom + someMagicAmountThatBringsThingsMoreVisible;

  }

}

 

If you worry about shift-tabbing so that the form goes up you’d need to basically have another check that makes sure the top is greater than the vPosition.

 

This is basic logic obviously but it should give you some ideas.

 

Matt

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Mika Kiljunen
Sent: Wednesday, June 01, 2005 11:55 PM
To: [email protected]
Subject: [flexcoders] Fields and focuses

 

Hi,

I stumbled into a problem when using keyboard to navigate on a flex UI. I have a tabnavigator tab which contains a form with plenty of different type of fields (textinputs, comboboxes, textareas, etc). It has about 25 fields or so and it does not fit into the screen so flex adds the vertical scrollbar to move up and down on the form.

 

Now if I set the focus on the first field and start typing stuff in it works fine. But eventually I move to the next field with tabulator key and enter some more data. When I move with tabulator to the field that is on the bottom of the screen and press tabulator to move to the next field (that is below the screenview) flex moves the focus (apparently) but it does not scroll the form down to show the field with the focus on (the one that is now out of sight).

 

What I mean is that flex does not “autoscroll” the view when the focus is set outside the visible view with tabulator. Is there a workaround for this?

 

--
Mika Kiljunen

 

 

 

 

 

 

 



Yahoo! Groups Links

Reply via email to