By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,962 Members | 1,791 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,962 IT Pros & Developers. It's quick & easy.

Experts - Very strange - Focus from one object to another

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.