Textbox control

Get help using Construct 2

Post » Mon Dec 30, 2013 11:34 pm

So my goal is to clear what is written in the textbox after the enter key is pressed. The only option I see is to set the text to something. I don't want to use "" because that is then used to populate a listbox and a whole bunch of clickable nothing's are shown.

Anyone know the trick to getting this to work? I was hoping for a textbox.clear action but alas there is none.
B
3
Posts: 2
Reputation: 204

Post » Tue Dec 31, 2013 2:04 am

@curteck you can get the value from textbox and AFTER you set the text to "". that way you don't have empty items on listbox.
List box items are separate text element that are accessed using an index. So setting a "" text to a listbox, it clears only the item (or row) at a specific index. In my example it just adds one more item at the end or replace the selected item value.
So to answer your question: Is no trick, just think that the order of your code makes the difference.(copy value then clear ... instead of clear than copy)
capx
B
84
S
21
G
23
Posts: 521
Reputation: 18,789


Return to How do I....?

Who is online

Users browsing this forum: RIDETHEPIG and 5 guests