[Xerte] Re: desktop - text entry cursor being shy

Dave Burnett d_b_burnett at hotmail.com
Tue Feb 26 20:35:58 GMT 2013



On an associated note, which icons can catch an onKeyPress event.I've been using rootIcon, but can I limit the scope at all?



From: Paul.Swanson at harlandfs.com
To: xerte at lists.nottingham.ac.uk
Date: Tue, 26 Feb 2013 19:35:41 +0000
Subject: [Xerte] Re: desktop - text entry cursor being shy











I notice that when you first get to the page, you’ve got:
 
setFocus(teicon.txt);
teicon.txt.text
 = "";
 
But on the return you have:
 
teicon.txt.text
 = prevtext;
setFocus(teicon);
 
Should it be
setFocus(teicon.txt);
 ?
 

Paul Swanson
Internal Business Systems Analyst
Internal Business Intelligence
Harland Financial Solutions
(800) 274-7280 Ext. 2462
Paul.Swanson at harlandfs.com

 


From: xerte-bounces at lists.nottingham.ac.uk
 [mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Dave Burnett

Sent: Tuesday, February 26, 2013 10:22 AM

To: Xerte list

Subject: [Xerte] desktop - text entry cursor being shy


 

I am setting up a text entry on a text icon:

 


teicon.txt.autoSize = 0;


teicon.txt._height = 26;


teicon.txt._width = 263;


//teicon.txt.border = 1;


teicon.txt.type = "input";


teicon.txt.selectable = 1;


teicon.txt.multiline = 0;


myTF = new TextFormat();


//myTF.font = "Arial";


myTF.font = "Arial Bold";


myTF.size = 16;


teicon.txt.setNewTextFormat(myTF);


setFocus(teicon.txt);


teicon.txt.text = "";


 


 


When this executes, the cursor appears as expected at index 0 and the user starts typing.


 


A "show answers" routine may pull the focus from that while text is being input (the cursor is in the box).


 


So I store the existing text and clear the box 


 



prevtext = teicon.txt.text;


teicon.txt.text = "";



 


Then the user comes back from the subroutine, I set it back up:


 


teicon.txt.text = prevtext;



setFocus(teicon);


//Selection.setFocus(teicon); //tried this as well



 


Which fills the text entry back up, and even accepts keys if I start typing.


But no cursor.


I need to click the mouse back in the box to get a cursor there again.


 


Setting the focus puts the cursor there initially, but not the second time around.


??


  














_______________________________________________
Xerte mailing list
Xerte at lists.nottingham.ac.uk
http://lists.nottingham.ac.uk/mailman/listinfo/xerte 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20130226/4363dd0e/attachment-0001.html>


More information about the Xerte mailing list