Results 1 to 3 of 3

Thread: Allow Tab in RichTextBox?

  1. #1

    Thread Starter
    PowerPoster Pc_Madness's Avatar
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    2,765

    Allow Tab in RichTextBox?

    How can I allow the user to use the Tab key?

    I've seen the example which turns off the tab stops, but that doesn't work so well.
    Don't Rate my posts.

  2. #2
    Frenzied Member Rick Bull's Avatar
    Join Date
    Apr 2002
    Location
    England
    Posts
    1,444
    You could do something like this I suppose

    VB Code:
    1. Private Sub RichTextBox1_KeyDown(KeyCode As Integer, Shift As Integer)
    2.     If KeyCode = vbKeyTab Then
    3.         KeyCode = 0
    4.         RichTextBox1.SelText = vbTab
    5.     End If
    6. End Sub

  3. #3

    Thread Starter
    PowerPoster Pc_Madness's Avatar
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    2,765
    Cool thanks, alot easier than I thought...
    Don't Rate my posts.

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