Results 1 to 6 of 6

Thread: Im Mad!

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    44

    Angry

    OK....Im Getting Really Frustrated With My Program....
    How Do I Make It So It Deletes With The SelStart Property...
    This Is What I Have Tried

    <I>
    Private Sub Command1_Click
    Text1.SelStart = ""
    End Sub
    </I>

    But Every Time I Try Pushing The Button It Wont Work
    <H1>Help!</H1>
    I Think I Might Dont Know The Answer To That One...

  2. #2
    Guest
    seltext = "" 'not selstart

  3. #3

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    44

    Tried That Too

    Yeah I Tried SelText Too...
    I Think I Might Dont Know The Answer To That One...

  4. #4
    Guest
    If you want the whole text to disappear, then use this.

    Code:
    Text1 = ""

  5. #5
    Hyperactive Member
    Join Date
    May 2000
    Posts
    367


    SelStart is to position the cursor in a textbox or richtextbox control, so if you wanted to position the cursor at the end of the text in the textbox you could do

    Code:
    txtMyTextBox.SelStart = Len(txtMyTextBox.Text)

  6. #6
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Deleting selection, if that's what you meant
    Code:
                    If Text1.SelLength Then
                        Text1 = Left(Text1, Text1.SelStart) & Mid(Text1, Text1.SelStart + Text1.SelLength + 1)
                    Else
                        Text1 = Left(Text1, Text1.SelStart) & Mid(Text1, Text1.SelStart + 2)
                    End If
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

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