Results 1 to 7 of 7

Thread: How can one move the selected text in a RTB to the top of the RTB

  1. #1

    Thread Starter
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    How can one move the selected text in a RTB to the top of the RTB

    I have used a RichTextBox and loaded text in it. I have searched the RTB for the text I wanted to find and have changed the color of that text. Now I would like to move the RTB box so that the selected text appears at the top of the RTB. I don't see a property that can do it so I am asking this question... How can one do this?

  2. #2

    Thread Starter
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: How can one move the selected text in a RTB to the top of the RTB

    I found the answer here and it works http://www.vbforums.com/showthread.p...ght=scroll+rtb

  3. #3
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: How can one move the selected text in a RTB to the top of the RTB

    I couldn't figure out what that example is suppose to do. I put some text in a RTB, selected the text string I wanted, clicked on the command button but it didn't do anything.

  4. #4

    Thread Starter
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: How can one move the selected text in a RTB to the top of the RTB

    Well, If your text is already at the top of the RTB then it will do nothing...

  5. #5
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: How can one move the selected text in a RTB to the top of the RTB

    No, that wasn't it. I put 10 lines into the RTB and line 6 had the text in it and I selected it and pressed the button but nothing happened. Also, I made sure that the text was the same as the hard coded text in the example.

  6. #6

    Thread Starter
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: How can one move the selected text in a RTB to the top of the RTB

    You have to have enough text in the RTB to scroll...

    10 line in the RTB when it holds 20 viewable lines is not enough...

  7. #7
    PowerPoster
    Join Date
    Jan 2008
    Posts
    11,074

    Re: How can one move the selected text in a RTB to the top of the RTB

    OK, thanks. Works now

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