This command does not work in the Message Box, apparently since the
message box entry field retains the focus. However, when you create a
button with only this command in the mouseUp handler it ought to work
just fine. Are you doing other things with your button script that might
get in the way?
I want to programatically select text in a field as if I had
doubleclicked it. For example... I want to select word 4 of a field.
When I enter the following statement in the Message Box or in a button:
select word 4 of field one
The insertion point flashes in the field and the focus
Curiousthis works here. You don't have an 'on openField' or some
other handler that might interfere?
Mark
On 9 Jan 2006, at 01:42, Bill Vlahos wrote:
I want to programatically select text in a field as if I had
doubleclicked it. For example... I want to select word 4 of a field.
The field displays the contents of a file selected from a list field.
This list is refreshed (because files are being added to the storage
folder at random intervals) with the following button script:
on mouseUp
getFiles - checks the contents of the storage folder and puts the
list in the
Ken, the field is a plain scrolling field with a vertical scroll bar. The following
Basic Properties are checked:
Visible, Don't wrap, Opaque, Focusable, Show border (Border width 2), Hilites:
Autohilite text
Text is Courier 12 point left justified
The field displays the contents of a file
PROTECTED]
Date: Fri, 12 Mar 2004 08:45:42 +0900
To: [EMAIL PROTECTED]
Subject: Re: How Do I Select Text in a Field?
on mouseUp
getFiles - checks the contents of the storage folder and puts the list in the
list field
send mouseUp to me in 60 seconds - so I click the button once and it runs
I know I'm missing something simple here...
I have a very simple field that contains text. lockText is false and traversalOn is
true. But when I select any text in the field it doesn't stay selected. The
highlighted text immediately reverts to unselected text and the cursor moves to the
top
It looks like some other handler is changing the selection after you
make it. Open up the Message Watcher, select your text and see what
messages are being triggered and acted on.
Sarah
I have a very simple field that contains text. lockText is false and
traversalOn is true. But when I select