-
Sep 10th, 2006, 06:29 PM
#1
Thread Starter
Hyperactive Member
Inserting text
hi every one
i need to know how to instert a text in the position of the cursor (not the mouse cursor (the blicking one that appears when we type))
Last edited by demon.KILER; Sep 11th, 2006 at 05:59 PM.
VS 2005 .....Framework SDK 3.0
"Its mostly the brave one who choose to not fight"
-
Sep 10th, 2006, 08:10 PM
#2
Re: Inserting text
I assume that you mean in a TextBox, and what you're talking about is called the "caret". To insert text at the caret position in a TextBox or RichTextBox you simply set the SelectedText property. If text is selected it will be replaced. If no text is selected then the new text is simply inserted.
-
Sep 10th, 2006, 08:58 PM
#3
Re: Inserting text
And if you don't wont text to be replaced if highlighted put
VB Code:
TextBox1.SelectionLength = 0
before setting the "SelectedText" value
"I'm not normally a praying man, but if you're up there, save me... Superman!" - Homer Simpson
My Blog
-
Sep 11th, 2006, 05:58 PM
#4
Thread Starter
Hyperactive Member
Re: Inserting text
ohhh ! thx
I never thought it would be that easy
you're talking about is called the "caret"
thx for the info
VS 2005 .....Framework SDK 3.0
"Its mostly the brave one who choose to not fight"
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
|