[Help] Get text what I typed in a Textbox..
Hello I am making someting like, Example:
Code:
Name: RyDeR (RyDeR is what I typed in the Textbox)
Age: 17 (17 is what I typed in the Textbox)
But now I have another Textbox but I want that this textbox automatic changes with what I type in the first boxes. Example:
Code:
His name is 'RyDeR'
He's '17' years old
.. Like this and if I type something else, it must change to in last textbox.
I hope I explained it good..
Waiting for all help of you guys..
Kind Regards..
Re: [Help] Get text what I typed in a Textbox..
sounds like a high school problem. So I'll basically help you on what you would need to do.
You would need a button that has the user clicks to update the new text box. Then you would need an integer and a string that holds the template string. Then you would combine the string and the integer into one string and then display that into the last text box when the user clicks on the button. EASY!
Re: [Help] Get text what I typed in a Textbox..
Use the TextChanged event of the first textbox.
Re: [Help] Get text what I typed in a Textbox..
Quote:
Originally Posted by
jakkjakk
sounds like a high school problem. So I'll basically help you on what you would need to do.
You would need a button that has the user clicks to update the new text box. Then you would need an integer and a string that holds the template string. Then you would combine the string and the integer into one string and then display that into the last text box when the user clicks on the button. EASY!
Why would you need an Integer and a String? If all you are doing is displaying them both in text boxes then they should both be Strings :)
Having said that, I would agree with Minitech that the easiest way would be to just use the TextChanged event of the first textbox to set the Text property of the other text box to whatever the value of the Text property on the input textbox is
Re: [Help] Get text what I typed in a Textbox..
It's not a High school problem ^^ I started new with this and I don't realy know how..
I actually want to make a program to make 'pawno' scripts easier..
Thank you for the code 'TextChanged' But I can't do anything whitout example :)
I'm new.. I'll try to learn so fast as I can.
So I need an example please? Oh ye It's VB 2008.
Kind Regards.
Re: [Help] Get text what I typed in a Textbox..
vb.net Code:
Private Sub TextBox1_TextChanged(ByVal sender As Object, ByVal e As EventArgs) Handles Me.TextBox1.TextChanged
Select Case Me.TextBox1.Text
Case "RyDeR"
Me.TextBox2.Text = "17"
Case "SoMeOnEeLse"
Me.TextBox2.Text = "32"
'etc...
End Select
End Sub
You understand?
Re: [Help] Get text what I typed in a Textbox..
Or
vb.net Code:
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
TextBox2.Text = "His name is " & TextBox1.Text
End Sub
and you figure out how to incorporate the age.
Re: [Help] Get text what I typed in a Textbox..
Thank you both :) It's actually easy but you have to know all the params and the codes then it's easy ^^
Kind Regards
Re: [Help] Get text what I typed in a Textbox..
Yeah, jargon can make any task difficult. What the heck is a pawno script? The only thing I can think of is too laughable to even mention (even if it wouldn't get me banned, which it might).
Re: [Help] Get text what I typed in a Textbox..
Example pawno:
http://wiki.sa-mp.com/wiki/PAWN_tutorial_1
I don't know or I may give links so forgive me ..
Re: [Help] Get text what I typed in a Textbox..
Ah, I see. Never heard of it, which is not entirely surprising.
Re: [Help] Get text what I typed in a Textbox..
One more thing
How to add more text in a RichTextBox1.Text = "{" example.
I write this, and an other one to, but only one line is comming up..
Re: [Help] Get text what I typed in a Textbox..
"Pawno" is just an IDE per se for the language "PAWN" which is used to develop game modes and plugins for SA-MP (San Andreas Multiplayer).
I made quite a few SA-MP game modes in my time. :)
I'm not really sure how you can make a program to help use PAWNO since its an IDE with all the methods and callbacks included, but hey, whatever floats your boat!