|
-
Jun 15th, 2002, 11:06 AM
#1
Insert String anywhere in a text box?
Hi!
VB Code:
text1.text = "world"
text1.text = text1.text + "hello"
that would give you "world hello" in the text box, but is it possible to insert text into text box anwhere so that you could rearange it as "hello world"?
-
Jun 15th, 2002, 11:36 AM
#2
PowerPoster
No, unless you actually backup the previous text and then update the text with new one. But if you want "Hello World", you can do like
VB Code:
Text1.Text = "Hello" & Text1.Text
or if you want to insert text somewhere in the middle, use Mid function actually get a certain number of chunks, append the new text to it, get the last chunks, and then update the text in the textbox with the new string.
-
Jun 15th, 2002, 11:41 AM
#3
Yea i do want to put the text in teh middle! i never thought of getting it as a string and editing that! DOH! i need to put it in where the cursor is. i.e. they click wehere they want the text in the text box and click a button and it puts text in there!
thanks!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|