Slimwaffle Posted December 27, 2018 Share Posted December 27, 2018 Hey Guys I need a way to remove the text from a textArea before setting it again. I am using lua. Can anyone please help? I have checked everywhere possible and can't find a solution. Quote Link to comment Share on other sites More sharing options...
AggrorJorn Posted December 27, 2018 Share Posted December 27, 2018 Haven't tried it, but can't you just set an empty text? Quote Link to comment Share on other sites More sharing options...
Slimwaffle Posted December 27, 2018 Author Share Posted December 27, 2018 No you can't and this is part of the problem. So SetText doesn't work like java's Set and append. It doesn't matter if you use SetText or AddText it will always add it under existing text and Setting empty text just creates an empty line. And the Scroll bar always stays at the top even though new text is added to the bottom. So to prevent the player from having to scroll through walls of text to see if an item is created or not. I want to be able to clear the Text before setting it again. Quote Link to comment Share on other sites More sharing options...
gamecreator Posted December 27, 2018 Share Posted December 27, 2018 This is one of the reasons I'm using my own GUI (I don't get the Leadwerks one and there is no documentation). But this may help you: https://www.leadwerks.com/community/topic/16418-gui-commands-meant-to-be-cumulative/ Quote Link to comment Share on other sites More sharing options...
Slimwaffle Posted December 27, 2018 Author Share Posted December 27, 2018 So the only option I can see to make this somewhat work is possibly creating a blank square and then a label over the top. To make it look like a textarea. Because SetText on a label does exactly what it is supposed to do. Its just a shame because a clear text command is really badly needed. Quote Link to comment Share on other sites More sharing options...
Slimwaffle Posted December 28, 2018 Author Share Posted December 28, 2018 Never mind Josh has fixed this in the beta already. In the beta the SetText() command works exactly as you would expect. 1 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.