Detect Enter in Textbox Multiline
Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
7 posts
Page 1 of 1
Hi Guys,
I am making a Html Program But,
When i put a text in a Textbox, i wanne know when i read the text in the textbox when he pressed enter so i can put<br/> after it..
I am making a Html Program But,
When i put a text in a Textbox, i wanne know when i read the text in the textbox when he pressed enter so i can put<br/> after it..
Is this what you want?
Code: Select all
Dim StuffToAdd as String = "</br>"
' // Textbox Key Down event
If e.KeyCode = Keys.Enter
TextBox1.Text += vbnewline & StuffToAdd
End If
Yh i know that but i want do to it in a string, when the user entered already in the textbox and then clicks a button
Code: Select all
Is it this? Do you know any program that would do the same, because I think I don't really understand youdim StuffToAdd as String = "<br>"
Dim boolEntered as Boolean = False
' // Textbox Key Down event
If e.KeyCode = Keys.Enter
boolEntered = True
End If
' // Some button event
If boolEntered Then
TextBox1.Text += vbnewline & StuffToAdd
boolEntered = False
End if
No
So Lets say
i put this in multinline Textbox
Hello,
..
..
So when he clicks on a button
it will look like this in an other textbox
Hello,<br/>
...<br/>
...<br/>
So Lets say
i put this in multinline Textbox
Hello,
..
..
So when he clicks on a button
it will look like this in an other textbox
Hello,<br/>
...<br/>
...<br/>
Code: Select all
For i As Integer = 0 To txtIn.Text.Length - 1
txtOut.Text += txtIn.Text(i)
If txtIn.Text(i) = vbLf Then
txtOut.Text += "<br />"
End If
Next
7 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023