CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: Tab in textbox

  1. #1
    Join Date
    Jun 2002
    Location
    West Virginia
    Posts
    131

    Tab in textbox

    Hey Guys,
    I can't figure this out. I'm using a textbox (multiline). When I press the tab the focus changes to the next control. I know I can get the keypress but I have to insert it into the text. How do I know where I am in the text? Is there something that says you are on the 15 character?
    Thanks in advance,
    Wayne

  2. #2
    Join Date
    Jun 2002
    Location
    Clane, Ireland
    Posts
    766
    I couldn't figure out how to stop the tab key jumping out of the current control, but you could use an alternative key to the tab key eg CTRL + T, and insert a CHR$(9) into your current location.

    Although using a Rich Edit Textbox, I was able to trap the TAB key using a KeyDown event.

    HTH
    JP

    Please remember to rate all postings.

  3. #3
    Join Date
    Jun 2002
    Location
    West Virginia
    Posts
    131
    Thanks for your reply.
    If richtext can capture the tab key then I will use it. Beats the other way I was going to do it.
    Wayne

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

Featured