How do I set a textfield to certain text after button click?

Get help using Construct 2

Post » Fri Sep 19, 2014 7:40 pm

Hi there,

I could use some help with the following:
I have two buttons (one name 'OK' and the other one named 'Reset') and a textfield.
When I start my layout, the textfield should read 'Test'.
When I click button OK, the text in the textfield should change to 'Button OK was clicked' and when I click button 'Reset', the text in the textfield should change to 'Button Reset was clicked'.

Anyone please?

Thanks!
Image
B
54
S
24
G
12
Posts: 96
Reputation: 10,316

Post » Sat Sep 20, 2014 4:11 am

start of layout = (your_text) -> set text -> "Test"

OK Button & reset = touch -> on touched object -> (OK_button) ->
------------------------- (your_text) -> Set text -> "Button OK was clicked" or "Button reset was clicked"
"If you want to move a mountain tomorrow, you should start by lifting stones today."
B
64
S
14
G
2
Posts: 291
Reputation: 6,666


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 25 guests