|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to go to the next control?I want to use code to move focus from the current control to the next
control (don't know the control name). Example, there are texbox A and B, and a button. The current focus is on A. When I press the button, the focus move from A to B with code. Somthing like, GotoNextControl(A). Please help Benson. VB2005 Benson,
Strange why do you not know the Control name, don't you have the source? The next control is the control with the next tab index. Cor Show quoteHide quote "Benson" <benson***@yahoo.com.hk> schreef in bericht news:eo$M3%23EOHHA.780@TK2MSFTNGP03.phx.gbl... >I want to use code to move focus from the current control to the next >control (don't know the control name). > Example, there are texbox A and B, and a button. The current focus is on > A. When I press the button, the focus move from A to B with code. Somthing > like, GotoNextControl(A). > > Please help > Benson. > VB2005 > What he is saying is that every control has a tab Index property.
Set these up for every control that you want to be focused on, in the order that you want. Then use that index to move from one control to the next. Benson wrote: Show quoteHide quote > I want to use code to move focus from the current control to the next > control (don't know the control name). > Example, there are texbox A and B, and a button. The current focus is on A. > When I press the button, the focus move from A to B with code. Somthing > like, GotoNextControl(A). > > Please help > Benson. > VB2005 Is this a web application or a windows forms?
If it's windows forms, then this is rather simple. if its a Web application, you will need to use javascript to navigate from one control to the next using javascript's Focus() function. let me know if you need any other help... regards, Sorcerdon Sorcerdon wrote: Show quoteHide quote > What he is saying is that every control has a tab Index property. > Set these up for every control that you want to be focused on, in the > order that you want. > Then use that index to move from one control to the next. > > > Benson wrote: > > I want to use code to move focus from the current control to the next > > control (don't know the control name). > > Example, there are texbox A and B, and a button. The current focus is on A. > > When I press the button, the focus move from A to B with code. Somthing > > like, GotoNextControl(A). > > > > Please help > > Benson. > > VB2005 "Benson" <benson***@yahoo.com.hk> schrieb: Check out the form's 'SelectNextControl' method.>I want to use code to move focus from the current control to the next >control (don't know the control name). > Example, there are texbox A and B, and a button. The current focus is on > A. When I press the button, the focus move from A to B with code. Somthing > like, GotoNextControl(A). -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Copying to the clipboard
breaking up a String into an array of chars and adding to datatable loading variable with AutoNumber field value after insert? Option Strict issue Menu - Eliminate The Triangular Arror pointer thing - How to do it? Network Communications not CLS-compliant Passing parameter to windows service... Logical Mistake ListView and Registry Key |
|||||||||||||||||||||||