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

Paul Swanson Paul.Swanson at harlandfs.com
Tue Feb 26 20:55:52 GMT 2013


Maybe it's the order in which you have the statements? On the return try setting focus before setting the text? It seems like it does have focus, but the cursor may be at the end of the string rather than the beginning (or vice versa), so maybe it's just out of view.

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 11:45 AM
To: Xerte list
Subject: [Xerte] Re: desktop - text entry cursor being shy

Hi Paul!

Yes, I've tried all the usual concatenations plus a few variations I found in the archives.
setFocus(teicon.txt); was what I had in there originally.
No joy.


________________________________
From: Paul.Swanson at harlandfs.com<mailto:Paul.Swanson at harlandfs.com>
To: xerte at lists.nottingham.ac.uk<mailto: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<mailto:Paul.Swanson at harlandfs.com>

From: xerte-bounces at lists.nottingham.ac.uk<mailto: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<mailto: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/4db8c513/attachment-0001.html>


More information about the Xerte mailing list