Results 1 to 5 of 5

Thread: selecting two texts at the same time

  1. #1

    Thread Starter
    Junior Member iRoN_RoCK's Avatar
    Join Date
    Jul 2008
    Posts
    31

    selecting two texts at the same time

    how to select two texts at the same time? i wrote this but it doesnt show selected text or doesnt even select it
    Code:
    Textbox1.SelStart=Textbox2.SelStart
    Textbox1.SelLength=Textbox2.SelLength

  2. #2
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Re: selecting two texts at the same time

    Try setting HideSelection to false on the textboxes.

  3. #3
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: selecting two texts at the same time

    You have two problems. First of all you can never have two texts selected at the same time and second, if you do that code, say, in a command button the command button takes the focus so neither textbox is selected.

  4. #4

    Thread Starter
    Junior Member iRoN_RoCK's Avatar
    Join Date
    Jul 2008
    Posts
    31

    Re: selecting two texts at the same time

    Quote Originally Posted by Negative0 View Post
    Try setting HideSelection to false on the textboxes.
    i couldnt do that

    Quote Originally Posted by MartinLiss View Post
    You have two problems. First of all you can never have two texts selected at the same time and second, if you do that code, say, in a command button the command button takes the focus so neither textbox is selected.
    hmm.. what about highlighting? actually i m trying to make a hex editor view with masked edit boxes. something like that:

  5. #5

    Thread Starter
    Junior Member iRoN_RoCK's Avatar
    Join Date
    Jul 2008
    Posts
    31

    Re: selecting two texts at the same time

    i did it:
    Code:
    Private Sub Text1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Text2.SelStart = Text1.SelStart
    Text2.SelLength = Text1.SelLength
    Text1.SetFocus
    End Sub
    but now i have to adapt it to maskedbox but maskedbox hasn't a MouseMove event

Tags for this Thread

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