Results 1 to 8 of 8

Thread: Insert characters at cursor position.

  1. #1

    Thread Starter
    Hyperactive Member Zaphod64831's Avatar
    Join Date
    Mar 2000
    Posts
    268
    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.
    Email: [email protected]

    Home Page: www.olemac.net/~hutch

    I'm bored, VERY bored, and I got bored with my sig. So I changed it to this.

  2. #2
    Guest
    Code:
    Text1.SelStart = Len(Text1)
    Text1.SelText = " more text added to the end?"
    
    'or
    
    Text1.text = Text1.text & "more text?"

  3. #3

    Thread Starter
    Hyperactive Member Zaphod64831's Avatar
    Join Date
    Mar 2000
    Posts
    268
    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.
    Email: [email protected]

    Home Page: www.olemac.net/~hutch

    I'm bored, VERY bored, and I got bored with my sig. So I changed it to this.

  4. #4

    Thread Starter
    Hyperactive Member Zaphod64831's Avatar
    Join Date
    Mar 2000
    Posts
    268
    Hey Aaron! Do you know it?
    Email: [email protected]

    Home Page: www.olemac.net/~hutch

    I'm bored, VERY bored, and I got bored with my sig. So I changed it to this.

  5. #5

    Thread Starter
    Hyperactive Member Zaphod64831's Avatar
    Join Date
    Mar 2000
    Posts
    268
    Hello? Anyone gonna help?
    Email: [email protected]

    Home Page: www.olemac.net/~hutch

    I'm bored, VERY bored, and I got bored with my sig. So I changed it to this.

  6. #6
    Guest
    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.


  7. #7
    Guest
    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.

  8. #8

    Thread Starter
    Hyperactive Member Zaphod64831's Avatar
    Join Date
    Mar 2000
    Posts
    268
    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
    Email: [email protected]

    Home Page: www.olemac.net/~hutch

    I'm bored, VERY bored, and I got bored with my sig. So I changed it to this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width