locked
tab button / textbox RRS feed

  • Question

  • ok so you know how you can number the textbox  so when you pressed the tab button and the cursor moves from one textbox to the next and to the buttons?

     

    where is there a way to  set a  textbox, where you cannot tab over to it and to where you cannot change the information in it?

    I am using C#

    Friday, April 23, 2010 2:12 AM

Answers

  • set the tabindex of control in control's properties..

     

    jayant

    • Marked as answer by Liliane Teng Wednesday, April 28, 2010 10:03 AM
    Friday, April 23, 2010 5:05 AM
  • Hm,

    As Jayant said, set the TabIndex to the proper order.  When you have the form in the designer, select View->Tab Order from the menu and simply click around the change the order.  Tab order is set relativ to the parent control.

    To make sure the user cannot change the information, set the TextBox.ReadOnly to True.


    ---
    Happy Coding!
    Morten Wennevik [C# MVP]
    • Marked as answer by Liliane Teng Wednesday, April 28, 2010 10:03 AM
    Friday, April 23, 2010 6:12 AM
  • Hi.

    Just change the text box setting to:

    textBox1.Enabled = false;

     

    That way, you can not change the content of the text box and no tabbing.

     

    Noam B
    _________________________________________________________

    Do not Forget to Vote as Answer/Helpful, please. It encourages us to help you...

    • Proposed as answer by Noam B Friday, April 23, 2010 2:20 PM
    • Marked as answer by Liliane Teng Wednesday, April 28, 2010 10:04 AM
    Friday, April 23, 2010 2:20 PM

All replies

  • set the tabindex of control in control's properties..

     

    jayant

    • Marked as answer by Liliane Teng Wednesday, April 28, 2010 10:03 AM
    Friday, April 23, 2010 5:05 AM
  • Hm,

    As Jayant said, set the TabIndex to the proper order.  When you have the form in the designer, select View->Tab Order from the menu and simply click around the change the order.  Tab order is set relativ to the parent control.

    To make sure the user cannot change the information, set the TextBox.ReadOnly to True.


    ---
    Happy Coding!
    Morten Wennevik [C# MVP]
    • Marked as answer by Liliane Teng Wednesday, April 28, 2010 10:03 AM
    Friday, April 23, 2010 6:12 AM
  • Hi.

    Just change the text box setting to:

    textBox1.Enabled = false;

     

    That way, you can not change the content of the text box and no tabbing.

     

    Noam B
    _________________________________________________________

    Do not Forget to Vote as Answer/Helpful, please. It encourages us to help you...

    • Proposed as answer by Noam B Friday, April 23, 2010 2:20 PM
    • Marked as answer by Liliane Teng Wednesday, April 28, 2010 10:04 AM
    Friday, April 23, 2010 2:20 PM