on 10-17-2007 9:58 AM
Hi,
I have a Table, which on press enter jump from one InputField to another.
How I could do to when the InputField gets focused, the text inside (a zero, because its an initialized integer) were selected and ready to write?
With this I would like to avoid that user has to delete the zero to write the number he/she wants.
Thanks!
Hi
Try
Requests to change the keyboard input focus to this view element.
It is undefined which focus request wins if there are several ones.
The request may silently fail, but is guaranteed not to throw an exception.
If this view element is a table cell editor, its occurence in the current
row (according to the context's lead selection) will receive focus. Similar
things will happen inside other containers that display multiple occurences
of the same view element.
requestFocus();
Ex: IWDTextEdit a;
a.requestFocus()
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you both, but I think you didnt understand my question.
The issue of InputField to get focus was solve before ask my question. I use requestFocus(), like you both says. But now, what I want to do is select the <b>text inside</b> of the InputField or delete this in some way to dont have to delete the zero with the keyboard before insert some number.
Thanks.
Hi...
Use the following the code:
if(firsttime)
{
// get the UI element you want to focus In this case i am taking a input field
IWDInputfield inputfield = (IWDInputfield)view.getElement("<UI element ID>");
inputfield.requestFocus();
I think you cant remove tht zero if u set the property as interger
GS
Message was edited by:
Sathishkumar GS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.