| Posted: 31 Oct 2009 10:35 | |
|
Registered User Currently Offline |
Posts: 3 Join Date: Oct 2009 |
|
Hi there. Though my English is poor, Please decipher it holding out.
I want to get selected text from edittext field. I thought, that's 'textselection' can, maybe. First, I found the code Japanese wrote. cause I'm same. but the code wasn't gave me what I want. this's the code. very simple. Code:
winObj = new Window("palette","Sample",[100,50,300,200]); editObj = winObj.add("edittext",[20,30,180,60],"123"); btnObj = winObj.add("button",[20,70,140,90],"get text"); btnObj.onClick = function() { alert(editObj.textselection); } winObj.show(); I selected "2" of "123", and pressed "get text"button, I thought UI alerts "2" too, but it was "". I want to know where is wrong of this code, and how to use 'textselection' rightly. and how to make selection "2" by code. please. |
|
| Posted: 31 Oct 2009 10:49 | |
|
Registered User Currently Offline |
Posts: 3 Join Date: Oct 2009 |
|
Sorry, I posted out of Q&A.
can't remove.. very sorry. |
|
| Posted: 02 Nov 2009 00:58 | |
|
Administrator |
Posts: 16 Join Date: May 2009 |
| I can't either get textselection property to work. While I can set the selection I can't get the selection. | |
| Posted: 16 Nov 2009 18:46 | |
|
Registered User Currently Offline |
Posts: 3 Join Date: Oct 2009 |
| OK, I throw it official Forums, thanks. | |