Hi all.

I've been beating my head against the wall for a bit, trying to get Selection.setSelection() to work inside a component.

I've got this code, inside a component which happens to contain a TextInput:

private function focusIn(){
       trace(answer_ti.text + "] received focus");
       answer_ti.setFocus();
       Selection.setSelection(0, answer_ti.text.length);
   }

Which gets runs when answer_ti fires a focusIn event. This just doesn't seem to work... the trace statement comes up, but I can't see the selection change.

Is there anything I've overlooked? I tried to use Delegate for event handling, but it didn't make a difference.

Thanks.

--
Haikal Saadh
Applications Programmer
ICT Resources, TALSS
QUT Kelvin Grove

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to