Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

Forcing TextBox to lose focus? [SOLVED] [closed]

Asked by 9 years ago

EDIT: RoboFrog's idea didn't work out for me. Anyone else got any other ideas on how to fix/solve this? Thanks in advance.

Hi guys, I was wondering if it was possible to force a TextBox GUI object to lose focus.

Not really much that I can elaborate on this but I am making a chat delay for my chat and I need it so that you can't click on the chat bar while the delay is active. (With the delay being to just set a variable to either true or false)

Any help is appreciated, thanks!

Locked by Spongocardo, adark, and BlueTaslem

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

2 answers

Log in to vote
2
Answered by
RoboFrog 400 Moderation Voter
9 years ago

Considering I'm reading this right, while the delay is active, you could always place another GUI element over the text box. I'm pretty sure you can't activate text boxes if they're under other GUI elements.

EDIT: Also set the TextBox"visible" property to false.

0
On second thought, it didn't work. I could still click the TextBox. Any other ideas? Spongocardo 1991 — 9y
0
Edited previous comment. Spongocardo 1991 — 9y
0
You could always do the same thing, but instead of just placing the GUI element over it, you could make the text box's "visible" factor to false. I know for a fact that it can't be interacted with while that is false. RoboFrog 400 — 9y
0
Right. I was trying to find a more "elegent" solution but that will do. I'll try that later. EDIT: Works, thank you and Zeptix too! Spongocardo 1991 — 9y
Ad
Log in to vote
1
Answered by 9 years ago

RoboFrog is correct. The best way to do this would be to set the Visible property to false at the time you need. Remember to NOT simply make it invisible with transparency, because then users will still be able to interact with it. Use the Visible property.