Results 1 to 4 of 4

Thread: richtextbox - don't select all word

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2007
    Posts
    44

    richtextbox - don't select all word

    Hi

    I've a richtextbox on my form. when i try to select some characters with the mouse the selection always stops at the end of the current word.
    how can i make that the selection stops at the mouse position.

    thanks

  2. #2
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,728

    Re: richtextbox - don't select all word

    It's a bug.
    Fix: Add the following line in Form_Load.
    RichTextBox1.AutoWordSelection = False
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  3. #3
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,728

    Re: richtextbox - don't select all word

    2008 has same bug too.
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


  4. #4
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: richtextbox - don't select all word

    Quote Originally Posted by yosilb
    Hi

    I've a richtextbox on my form. when i try to select some characters with the mouse the selection always stops at the end of the current word.
    how can i make that the selection stops at the mouse position.

    thanks
    Hi,

    You can try this:

    vb.net Code:
    1. Private Sub rtxtEditor_SelectionChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rtxtEditor.SelectionChanged
    2.         Dim bUpdating As Boolean = False
    3.         'Set flag for bypassing
    4.         bUpdating = True
    5.  
    6.     End Sub

    rtxtEditor is your Richtextbox
    Wkr,

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

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