Results 1 to 3 of 3

Thread: ..eh, just look inside

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Location
    NY
    Posts
    5

    Exclamation

    hey, i was wondering.. in a text box.. when u click a button, i want it to add a character in front of the character thats in the text box. u can do that with text1.seltext.. and it will add it to whereever u click.. but, how could i make it so, if i highlight 2 or 3 characters, and click the button, it adds something in front of those 3 characters selected, instead of just deleting them.

    ex..

    Hello

    i highlight LLO, and click the button

    He*llo .. see what i mean?

    thanks
    Vb6 EE

  2. #2
    Hyperactive Member theman32x's Avatar
    Join Date
    May 2000
    Location
    New Jersey, USA
    Posts
    305
    i think the following will do the trick:

    text1.seltext = text1.seltext & "some text here"

    i think it doesn't replace the text

  3. #3
    Lively Member
    Join Date
    Jan 1999
    Location
    Burlington, IA, USA`
    Posts
    77

    Talking

    'something like this?

    Private Sub Command1_Click()
    Dim b As String
    Dim c As Integer
    Dim d As Integer
    Dim e As Integer
    b = Text1.SelText
    c = Len(Text1)
    d = Len(Text1.SelText)
    e = c - d
    Text1 = Left(Text1, e) & "*" & b
    End Sub

    Private Sub Form_Load()
    Text1 = "Hello"
    End Sub
    An ass may bray a good long time before he shakes the stars down.
    T.S. Elliot

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