-
Sorry, I'm working on an HTML editing program and fixing a lot of minor bugs.
Can anyone tell me how to insert a character into a text box at the position of the blinking cursor?
I can guarantee I'll be needing a few other questions answered, so keep looking please.
-
Code:
Text1.SelStart = Len(Text1)
Text1.SelText = " more text added to the end?"
'or
Text1.text = Text1.text & "more text?"
-
I can add it to the end easily enough, I just need to know how to insert a string at the position of the cursor, even in the middle of the text box text.
-
Hey Aaron! Do you know it?
-
Hello? Anyone gonna help?
-
Are you using a Rich Text Box? If you are, then you should be able to do what you are asking.
If your not, go to Project->Components and look for Microsoft Rich Text Box Control.
Click the little check box next to it, and click apply. Now it is in your toolbox ready to be used.
Sorry for wasting your time if this isn't what you ment...good luck.
-
I'm not exactly sure what you are trying to do, but you can get the points where the mouse is located.
Code:
Private Sub Text1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.Caption = X & ", " & Y
End Sub
Oh yeah, and if your making an HTML Editor, you may have to use a RichTextBox because a regular Textbox has a limit of characters while a RichTextBox doesn't.
-
You had it right the first time Matthew Gates. I just didn't follow because it seemed like that was to put it at the end of the string, instead of in the middle. But I got it explained in a different thread and see what to do now.
Thanks for your help :)