2 TextBoxs in the same Gui.

Started by Kikutaâ„¢, Thu 23/03/2006 19:57:07

Previous topic - Next topic

Kikutaâ„¢

Hey.

I've created two text boxs, differents, in the same gui, implemented the their instructions. Everything went well except the fact that when I click in one TextBox and start writing, the same thing appears in both of them. I could, in fact, split them into 2 differents Gui, but I don't want. :P

So, does anyone here had a smilliar problem ?

RickJ

#1
 ;) Yeah, that's how they work.  I brought this up a long time ago and it's in the tracker.  Anyway, what I do is use a button control for the input field.  When the button is clicked I make the text box visible, resize, and position it over the button, copy the button text to the textbox text, and erase the button text.  The textbox event handler then copies the text from the textbox back to the button and makes the textbox invisible.   With this method you can have as many input fields as you want. 

Ashen

There's also this thread on the first page of Beginner's Tech, and another recent thread linked in it, that might be of use to you.
I know what you're thinking ... Don't think that.

SMF spam blocked by CleanTalk