Focus on Textboxs

Get help using Construct 2

Post » Fri Apr 25, 2014 9:18 pm

Hello. So I am making a for a desktop user where when they click a button a certain textbox will have the cursor in it ready to type. When they click a different button, a different textbox will be ready to type in. I have tried using the textbox set focused option, but it didn't work. Can anyone help me please? I have looked around a lot for a solution, but I haven't been able to find anything.
Posts: 3
Reputation: 156

Post » Fri Apr 25, 2014 11:44 pm

From your post, it seems to me like you are doing it correctly. When the button is pushed, the event should fire the setFocus action of the textBox you want the cursor in. A possible reason it is not working is, there may be an event later in your event sheet which is getting fired and giving focus to another object. You could test this by making one of the events in question the very last event in the event sheet. Then, if the button works to set the focus when you run it, you will know this is the issue.

Other than that, I would have to look at your setup to get a better idea of what is going on. If you don't mind posting the capx file, I can take a look at it and see if I can see anything for you. Or you can PM me if you don't want the file public.
Posts: 331
Reputation: 7,767

Return to How do I....?

Who is online

Users browsing this forum: fbarraza28, SERGIOManOwaR, Slug101 and 6 guests