471,627 Members | 1,717 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,627 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 1226
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Paul Thompson | last post: by
1 post views Thread by Barry Svee | last post: by
3 posts views Thread by bradwiseathome | last post: by
reply views Thread by Richard Hollenbeck | last post: by
7 posts views Thread by Dave Booker | last post: by
3 posts views Thread by jan.loucka | last post: by
reply views Thread by leo001 | last post: by

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.