Set Text Entry Equal to Typed Value As Value is Typed

I have been creating a software simulation with text entry boxes. I have a red square behind the data entry box, which creates a red border around it. I would like this border to disappear as soon as the user starts typing in the box. Currently the value doesn't change until control loses focus (by default). Is there a way to alter this so that the value is updated every time a key is pressed?

What I want is a trigger that says something like "Set textentry1 equal to the typed value when user presses any key."

8 Replies
Emily Ruby

Hello Andrew,

I have tested this scenario with a text entry box and a red rectangle shape behind it. What I did was add a trigger to the rectangle shape to Change the state of Rectangle to Hidden when the user clicks within the text box.

Attached is a file to look at.

Let me know if this helps.

Ashley Terwilliger-Pollard

Hi Amar,

As Andrew mentioned above - clicking on a key and looking to capture that they clicked a particular letter you'd have to let the "text entry lose focus" meaning that they likely clicked outside the text entry or used the "enter" key to submit the text. If you are only looking for them to press any key - not necessarily enter it into a text box, there is a trigger for a key press and you would need to choose which key would submit that entry. There is not a "wild card" option to allow them to press anything. 

Amar Kulshreshtha

Hi Ashley and Phil 

Thanks for your reply i tried but not able to do it, here is my story file: 

Right now triggered used as shown below:

Change state of Submit button when Variable change "text entry box" not equal to blank.

Its working fine but user need to click outside or press enter button, didn't change the states instantly and i don't want this.

I want submit button should enable when user type any text in text entry box, no need to press enter or click outside the box.

Thanks in advance :)

Wendy Farmer

Hi Amar

create a shape with a visited state and put it off the stage. Set a trigger to change state of offstage object to visited when user clicks text entry box - then set another trigger to change state of submit button to normal when state of offstage object is visited.

See updated file