none
Tab order in options page RRS feed

  • Question

  • Hi,

    I added a page to the Tools -> Options... dialog, the page is a Windows Forms user control, I have set the controls' tab orders correctly, but when it hosted to the options dialog, the tab order is wrong. The sample project ("IDE -> C# Example.OptionsPage") included in the sdk also have this problem, you will see in the Custom page, the TabIndex of 'Choose Image' button is 1, and the 'Clear Image' button is 2, but in the runtime, the tab order is reversed.

    Do you know is there a way to fix it?

    Thanks,
    Showching
    Sunday, February 7, 2010 3:35 AM

Answers

  • I have run into this too...
    It seems the _creation_ order of the controls on the page is the order really used.
    IOW - the TabIndex property is ignored.

    HTH,
    Reed Shilts
    <Standard-Disclaimers-Apply/>
    • Proposed as answer by Reed Shilts Monday, February 8, 2010 7:52 PM
    • Marked as answer by Nancy Shao Monday, February 15, 2010 8:56 AM
    Monday, February 8, 2010 7:52 PM
  • Hi Showching,

    Sorry for misunderstanding.

    Yes, Tab Order in this scenario does not work fine. The order of Tab is followed by the order of adding controls to UserControl as Reed mentioned. If you want to change this order, you can modify the order of adding controls to the UserControl in OptionsCompositeControl.cs in the OptionsPage Sample as following code shows:

    this.Controls.Add(this.buttonChooseImage); //1st focused
    this.Controls.Add(this.buttonClearImage);   //2nd focused   
    this.Controls.Add(this.pictureBox);

    I'm not sure the cause, if you really care about this cause, I would suggest you posting a feedback on Connect Website below:

    https://connect.microsoft.com/VisualStudio/

    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.
    • Marked as answer by Nancy Shao Monday, February 15, 2010 8:56 AM
    Wednesday, February 10, 2010 9:36 AM

All replies

  • I have run into this too...
    It seems the _creation_ order of the controls on the page is the order really used.
    IOW - the TabIndex property is ignored.

    HTH,
    Reed Shilts
    <Standard-Disclaimers-Apply/>
    • Proposed as answer by Reed Shilts Monday, February 8, 2010 7:52 PM
    • Marked as answer by Nancy Shao Monday, February 15, 2010 8:56 AM
    Monday, February 8, 2010 7:52 PM
  • Hi Showching,

    Do you mean the Choose Image button and Clear Image button will be different position between designer time and runtime. If so, it works fine in my side. The original picture as following shows:



    The runtime picture shows below:




    They are the same. So I can't reproduce your issue in my side. 

    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 9, 2010 8:04 AM
  • Hi Nacy,

    I mean the tab order of the buttons not the button postions.

    Thanks,
    Showching

    Tuesday, February 9, 2010 10:46 AM
  • Hi Showching,

    Sorry for misunderstanding.

    Yes, Tab Order in this scenario does not work fine. The order of Tab is followed by the order of adding controls to UserControl as Reed mentioned. If you want to change this order, you can modify the order of adding controls to the UserControl in OptionsCompositeControl.cs in the OptionsPage Sample as following code shows:

    this.Controls.Add(this.buttonChooseImage); //1st focused
    this.Controls.Add(this.buttonClearImage);   //2nd focused   
    this.Controls.Add(this.pictureBox);

    I'm not sure the cause, if you really care about this cause, I would suggest you posting a feedback on Connect Website below:

    https://connect.microsoft.com/VisualStudio/

    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.
    • Marked as answer by Nancy Shao Monday, February 15, 2010 8:56 AM
    Wednesday, February 10, 2010 9:36 AM