am created runtime controls in flowlayoutpanel my code is below.
Expand|Select|Wrap|Line Numbers
- First Controls
- TextBox tbb=new TextBox();
- tbb.Name="tbb"+ i.tostring();
- tbb.Location=tbpoint; // tbpoint declare in ClassBody
- tbpoint.Y+=70;
- this.FlowlayoutPanel1.Controls.Add(tbb);
- i++;
- Another Control
- TextBox bb=new TextBox();
- bb.Name="bb"+ i.tostring();
- bb.Location=tbbpoint; // tbbpoint declare in ClassBody
- tbbpoint.Y+=70;
- this.FlowlayoutPanel1.Controls.Add(bb);
- i++;
Expand|Select|Wrap|Line Numbers
- tbb bb
The problem is when user created above controls don't know how much it maybe two or three or maybe more then that. after create controls the cursor move to above flowlay out panel where textbox1 is there. I wants to setfocus on tbb which is created by user after leave textbox1. and then on tbb keypressevent of enter if user perform enter on tbb then focus should be on bb and on and on.
I don't know how to set focus on created controls in flow layout panel.
Kindly suggest me proper coding please.
thx in advance.