Home > Net >  C # controls array
C # controls array

Time:10-18

Such as topic, winform forms datagridview and combobox, is contained in the textbox control, how to define an array placed these controls, realize the up and down or so key switch focus

CodePudding user response:

The Control [] arr=new Control [] {textBox1, DataGrdiview1, comboBox1, combobox2,... };
.

CodePudding user response:

Well, I think you should understand the TabIndex attribute

CodePudding user response:

refer to the second floor wanghui0380 response:
well, I think you should understand the "TabIndex attribute

I'm can't use the TAB key to switch focus, with the up and down key switch

CodePudding user response:

reference 1st floor caozhy response:
Control [] arr=new Control [] {textBox1, DataGrdiview1, comboBox1, combobox2,... };
.

Ok, thanks
  •  Tags:  
  • C #
  • Related