473,386 Members | 1,644 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,386 software developers and data experts.

Experts - Very strange - Focus from one object to another

Hi,

I've a strange problem in my form. I have a textBox which i want to get the
focus when the form is loaded, so i gave it TabIndex=1 and on the load method
i wrote textBox1.Focus(). I have two more dataGrids which i was able to move
from one to another by clicking Enter, then i wanted to move from DataGrid2
to another textbox i have, and i couldn't. i tried to change the TabIndexs of
all the objects, and what i got is that now nothing works! I lost the focus
of textbox1, i can't make the focus to move from dataGrid2 to the last
textBox. WHAT CAN I DO?

Do i have to set the TabIndex, is there a way fix this problem?

Thanks,
Gidi.
Jan 19 '06 #1
2 1271
Can you post your code?
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Gidi" <sh*****@hotmail.com.dontspam> wrote in message
news:D0**********************************@microsof t.com...
Hi,

I've a strange problem in my form. I have a textBox which i want to get
the
focus when the form is loaded, so i gave it TabIndex=1 and on the load
method
i wrote textBox1.Focus(). I have two more dataGrids which i was able to
move
from one to another by clicking Enter, then i wanted to move from
DataGrid2
to another textbox i have, and i couldn't. i tried to change the TabIndexs
of
all the objects, and what i got is that now nothing works! I lost the
focus
of textbox1, i can't make the focus to move from dataGrid2 to the last
textBox. WHAT CAN I DO?

Do i have to set the TabIndex, is there a way fix this problem?

Thanks,
Gidi.

Jan 19 '06 #2
Hi,

"Gidi" <sh*****@hotmail.com.dontspam> wrote in message
news:D0**********************************@microsof t.com...
Hi,

I've a strange problem in my form. I have a textBox which i want to get
the
focus when the form is loaded, so i gave it TabIndex=1 and on the load
method
i wrote textBox1.Focus(). I have two more dataGrids which i was able to
move
from one to another by clicking Enter, then i wanted to move from
DataGrid2
to another textbox i have, and i couldn't.
How are you trying to move from the grid to the textbox? if by pressing TAB
then you should set your TabIndex accordingly

i tried to change the TabIndexs of all the objects, and what i got is that now nothing works! I lost the
focus
of textbox1, i can't make the focus to move from dataGrid2 to the last
textBox. WHAT CAN I DO?


The TabIndes should work fine, alone. It seems that you are intercepting
some events from some of the controls and using Focus , this may interfere
with the flow that TabIndex provide

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Jan 19 '06 #3

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

Similar topics

4
by: Paul Thompson | last post by:
How do I determine in JavaScript the name of the object that focus is on?
1
by: Barry Svee | last post by:
I'm struggling with the JavaScript blur event. I have an activex control that I need to interact with when a window loses focus, namely to instruct it to give up control of a barcode scanner so...
3
by: bradwiseathome | last post by:
I focus on controls in a web form like this: <script language="javascript"> var focusControl = null; if (document.getElementById) focusControl = document.getElementById('txtArea1'); else if...
0
by: Richard Hollenbeck | last post by:
I've asked this question before but over a month later I still don't have an answer. A few people did try to help and I am thankful, but I really didn't get the problem solved. I'll try to ask...
4
by: SJ | last post by:
Hi all, I have come across a weird problem when attempting to automatically set the focus in a vb.net form to a checkbox control... In my form I have (on a tab page in a tab control) several...
1
by: clickon | last post by:
For testing purposes i have got a 2 step WizardControl. Eqach step contains a text box, TextBox1 and TextBox2 respectively. If i put the following code in the respective activate event handlers...
7
by: Dave Booker | last post by:
I am using a WebBrowser object in my .NET 2.0 application, but it is not shown to the user. Every time a timer event triggers it to perform a m_WebBrowser.Navigate() I get that classic IE 'click'...
4
by: Roger | last post by:
Hi, I am confused about the differences between this.window.focus(), window.focus(), and this.focus(). I want to use the calls in a <body onload="..."tag. What are the differences between...
3
by: jan.loucka | last post by:
Hi, I looked around for this specific problem but could not find any answer - there's few things in VB but still nothing exactly like this so I'd appreciate any help. We're writing C# WinForm...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.