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

    Focus on Text Box

    I have several Text Box, Combos and other controls on the form. I want the user to have the ability to move through all controls using Tab Key. Tab doesn't work on the Control with lowest TabIndex property. If I change TabIndex from 0 to 1 Tab works on this Control but stops to work on previous one which means that all other properties are good. If I set TabStop property of previous control to false, Control with TabIndex=1 stops to work. Everything was fine before, and I cannot find what I changed to break correct behavior of the Text Box. Using SetFocus doesn't solve the problem. The focus goes to the previous control when user pushes Tab button. Any ideas? I'm stuck with this stuppid problem. For me it looks like a bug. I've never met it before.
    Thank you.
    Vlad


  2. #2
    Join Date
    Aug 1999
    Location
    India-Delhi
    Posts
    106

    Re: Focus on Text Box

    Vlad,
    What I do in this situation that I renumber the tabindex right from the top. That is - I sequence all the control where I want to get the focus and then I give tabindex manually. It is little time consuming but effective. Just identify the order in which you wish tab to move and just re-number tab index!!!
    Good Luck.

    Santulan

  3. #3
    Guest

    Re: Focus on Text Box

    Thank you.
    It doesn't work. Only after I set the focus on different control using mouse and com back to previous one with mouse click it starts to work. I have a copy of my previous version of project. Although I see the correct TabIndexes for all controls in their propertiy windows, real Tab Order is different. When I'm tabbing the focus jumps from control with TabOrder=0 to 28, after that it follows to 29, 30. When it finishes it starts with 0, then 1,2 and no more wrong sequence. What's the hell.
    Vlad


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