View Full Version : setFocus(), textArea. Can I unselect the content?
ufitzi
03-14-2005, 08:32 PM
After receiving the focus, any content in the textARea is highlighted.
I just want the cursor placed in the textArea minus the text selection.
Is there another hierarchical class method I need to call for this to happen, or am I stuck with my highlighted (and now easily deletable) text???
Thanks folks, Ben
SrinivasSM
03-15-2005, 05:40 AM
Hi Ben,
I hope u need to OverRide the setFocus() function of the TextArea in which the Focus is set to the label inside the TextArea.U need to override this function and just shift the focus to something else.I hope this will solve ur problem.
Carlos Quesada
07-15-2005, 07:11 PM
This worked for me:
Selection.setFocus("_root.textArea.label");
Selection.setSelection(_root.textArea.label.length , _root.textArea.length);
After receiving the focus, any content in the textARea is highlighted.
I just want the cursor placed in the textArea minus the text selection.
Is there another hierarchical class method I need to call for this to happen, or am I stuck with my highlighted (and now easily deletable) text???
Thanks folks, Ben
vBulletin® v3.7.1, Copyright ©2000-2009, Jelsoft Enterprises Ltd.