473,394 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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
Jan 15 '07 #1
4 4549
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

"Benson" <be*******@yahoo.com.hkschreef in bericht
news:eo***************@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

Jan 15 '07 #2
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
Jan 15 '07 #3
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:
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
Jan 15 '07 #4
"Benson" <be*******@yahoo.com.hkschrieb:
>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).
Check out the form's 'SelectNextControl' method.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Jan 15 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Vincent Yang | last post by:
I'm using Access 2002. My database is in Access 2000 format. I'm designing a form to collect responses to a 40-item questionnaire. I can fit four list boxes on a screen, so I plan to have 11 tab...
2
by: David Kao | last post by:
HI All: I am currently implementing a TextBox to allow user to type the things the user wants to search. The actual search routine is happening on Textbox Validated event. My user wants me trap...
2
by: Mad Scientist Jr | last post by:
I have autopostback turned on for Textbox1. When the user tabs out of it, the codebehind recalculates some other fields based on its value, and the user should be able to start typing a value in...
4
by: chreo | last post by:
I assume that it is not hard problem. I would like user to only click in datagrid to select whole row - DONE I would like user to select whole row using UP and DOWN arrows. - DONE. And I would...
3
by: chreo | last post by:
Hello. I have datagrid. I found code to select all row in data grid (by mouse or arrow keys). This works great - user can select row and... ....and I want to go to next control. For...
4
by: Vayse | last post by:
I have a text box, with a command button next to it. When the button is pressed, I want to run some code. Then pass the focus to the next control. How do I do this? Thanks Vayse
4
by: praveen | last post by:
I have a form with treeview control loaded from xml document,text box, two buttons named "Find" and "FindNext" and my treeview which looks like below. Details |__ policy status |__ created by...
8
by: GaryDean | last post by:
I have a Wizard page and need to affect the next and previous buttons from my code-behind. I've googled around and found two solutions, and neither appear to work. I can access the SideBarList...
16
by: pupilstuff | last post by:
hi guys i just want to perform custom paging in which at the footer of the grid view ,there must be a pager 'pervious/next with numeric' this is what i did in aspx page <asp:GridView...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.