locked
Tab not working. RRS feed

  • Question

  • Hi,

    I have rendered a document window with some form control in the MDI area.Its opening fine. The problem is that when I use tab button the cursor is not moving to the next control.

    The user control class definition I have used is

    public partial class UCFormControl : UserControl, IVsWindowPane, IOleCommandTarget, IVsPersistDocData{}

    When I open the same user control in the windows form the tab button gets working.

    Can any one help?

    Thursday, January 28, 2010 8:42 AM

Answers

  • Check your implementation of IVsWindowPane.TranslateAccelerator. This should be getting the Tab key message. You'll need to route it accordingly.

    Some implementations reroute the message by callign the control's PreProcessMessage. If you search on TranslateAccelerator in the VS SDK samples, you'll probably hit on a few examples of this.

    Sincerely,
    Ed Dore
    Tuesday, February 2, 2010 10:52 PM

All replies

  • Hi Ankesh772,

    Based on my understanding, you mean when you input TAB key in keyboard, The focus does not move to the next control. If so, I would suggest you check the value Control.TabStop Property which gets or sets a value indicating whether the user can give the focus to this control using the TAB key. If the value is false, please change it to True. You can directly modify the property of this control using following sentence:

    MyControl.TabStop = true;

    If I misunderstood you, or you have any questions, please let me know.

    Best Regards,
    Nancy
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Tuesday, February 2, 2010 7:54 AM
  • Hi Nancy,

    I have checked for tab stop still its not working. As I have told when the same UserControl is rendered in Windows form tab works.

    Thanks.

    Tuesday, February 2, 2010 12:15 PM
  • Check your implementation of IVsWindowPane.TranslateAccelerator. This should be getting the Tab key message. You'll need to route it accordingly.

    Some implementations reroute the message by callign the control's PreProcessMessage. If you search on TranslateAccelerator in the VS SDK samples, you'll probably hit on a few examples of this.

    Sincerely,
    Ed Dore
    Tuesday, February 2, 2010 10:52 PM