Page 1 of 1

Putting some life into an empty field

Posted: Thu May 24, 2018 6:14 am
by RossG
I have three fields which I've set up to
react to a mouseUp but I find that if
a field is empty it "plays dead" even
though I've added code to get a function
if "me is empty" but still no reaction.

Is there an answer?

Re: Putting some life into an empty field

Posted: Thu May 24, 2018 6:42 am
by SparkOut
Unlocked fields don't react to mouse events the same way as locked fields, since it will likely need user interactions such as using the mouse to place the cursor, for instance. Try setting the lockText to true and see if it behaves as you expect.
You can use other events such as openField and selectionChanged to have scripts in your unlocked fields that do things.

Re: Putting some life into an empty field

Posted: Thu May 24, 2018 1:55 pm
by dunbarx
What Sparkout said.

So, are your fields indeed unlocked? If so, then also read in the dictionary about the "textChanged" message.

The point he made was that you will have to use one or more of these in order to detect an "action" in an editable field. After all, "mouseUp" is only that, a message sent when you do something in a control. "Do", here, means to create an event that sends a message.

Craig Newman