Results 1 to 3 of 3

Thread: TextBox and the Tab key

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Posts
    67

    Post

    I wonder how can i crete a texteditor that can perform a
    tab in my textbox without having my application switching
    control to the next tabindex.

    Is there a way to do that.

    If there is i don't it and would really appreciate.

  2. #2
    Lively Member
    Join Date
    Mar 2000
    Posts
    81
    Well I've done a similar thing in the past by calling code below in, say a rich text box's GotFocus event:

    Code:
    Private Sub SetTabsEnabled(Optional ByVal NewSetting As Boolean = True)
    
         Dim X As Control
    
         On Error Resume Next
         For Each X In Me.Controls
              X.TabStop = NewSetting
         Next
         On Error GoTo 0
    
    End Sub
    
    Private Sub rtfBody_GotFocus()
    
         SetTabsEnabled False
    
    End Sub
    
    Private Sub rtfBody_LostFocus()
    
         SetTabsEnabled
    
    End Sub
    Hope it helps!

    Toot
    Some cause happiness wherever they go; others, whenever they go.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2000
    Posts
    67

    Wink

    Thanks!

    It helped me very much.

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