Thanks for the effort Philippe but that also fails. (the first time)

 


From: [email protected] [mailto:[email protected]] On Behalf Of Philippe Maegerman
Sent: Friday, July 15, 2005 12:54 PM
To: [email protected]
Subject: RE: [flexcoders] onFocus, setSelection not highlighting textinput

 

If you want the focus every time the current Viestack container is shown you can trigger the focus on the 'show' event of the container:

 

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">
<mx:LinkBar dataProvider="vs"></mx:LinkBar>
<mx:ViewStack id="vs">
<mx:HBox label="1"></mx:HBox>
<mx:HBox label="2" show="Selection.setFocus(myTI);"><mx:TextInput id="myTI"/></mx:HBox>
</mx:ViewStack>
</mx:Application>

 

Philippe Maegerman

 


From: [email protected] [mailto:[email protected]] On Behalf Of Philippe Maegerman
Sent: vendredi 15 juillet 2005 18:47
To: [email protected]
Subject: RE: [flexcoders] onFocus, setSelection not highlighting textinput

<mx:TextInput id="myTI" creationComplete="Selection.setFocus(myTI);"/>

 

Philippe Maegerman

 


From: [email protected] [mailto:[email protected]] On Behalf Of Stacy Young
Sent: vendredi 15 juillet 2005 18:11
To: [email protected]
Subject: RE: [flexcoders] onFocus, setSelection not highlighting textinput

Tried that too, no dice. :(

 

 


From: [email protected] [mailto:[email protected]] On Behalf Of Philippe Maegerman
Sent: Friday, July 15, 2005 12:07 PM
To: [email protected]
Subject: RE: [flexcoders] onFocus, setSelection not highlighting textinput

 

maybe add creationComplete = "this.setFocus()" on the field itself

 

 


From: [email protected] [mailto:[email protected]] On Behalf Of Stacy Young
Sent: vendredi 15 juillet 2005 17:49
To: [email protected]
Subject: RE: [flexcoders] onFocus, setSelection not highlighting textinput

p.s. only occurs when displayed for the first time. (textinput sits in a viewstack). Tried changing the creationPolicy to all, no effect. When the viewstack is flipped back to show the field again later, the setFocus works as intended. Ack!

 


From: [email protected] [mailto:[email protected]] On Behalf Of Stacy Young
Sent: Friday, July 15, 2005 11:41 AM
To: [email protected]
Subject: [flexcoders] onFocus, setSelection not highlighting textinput

 

Minor annoyance here but I can’t seem to get the text of a textinput field to highlight properly. It’s as if the setFocus occurs before the textinput value is set so the cursor is just placed at index 0 of the field. Also tried explicitly selection the text in the field using setSelection but alas, no effect.

 

Myfield.text = “blah”;

Myfield.setFocus();  (or Selection.setFocus(Myfield))

 

Appreciate any insight,

Gracias,

Stace

 





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



------------------------------------------------------------------
**STATEMENT OF CONFIDENTIALITY**

This e-mail and any attached files are confidential and intended solely for the use of the individual to whom it is addressed. If you have received this email in error please send it back to the person that sent it to you. Any views or opinions presented are solely those of author and do not necessarily represent those the Emakina Company. Unauthorized publication, use, dissemination, forwarding, printing or copying of this email and its associated attachments is strictly prohibited.

We also inform you that we have checked that this message does not contain any virus but we decline any responsability in case of any damage caused by an a non detected virus.
------------------------------------------------------------------



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




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.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




Reply via email to