473,382 Members | 1,289 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,382 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 1270
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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:
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...
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...

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.