i have a tabcontrol in my form and i have a datagrid in tab2 and want
to validate the data in tab1 before the user can encode data in
datagrid. i set the the datagrid1_enter event to something like this:
Private Sub DataGrid1_Enter(ByVal sender As Object, ByVal e As
System.EventArgs) Handles DataGrid1.Enter
If IDNo.Text = "" Then
MessageBox.Show("Enter students idno information
before entering school year and semester.")
Me.IDNo.Focus()
End If
End Sub
in order that if the idno is empty which is located in tab1 the focus
will return to idno in tab1.
i used the code above w/ no luck. anyone can suggest a good way to
handle setfocus?
thanks in advance 7 1713
'first select the right tabpage on the tabcontrol
tabcontrol.SelectedTab = tabPageYouWant
'setfocus to control on tabPageYouWant
contol.setfocus
hope it helps
"jaYPee" <hi******@yahoo.com> wrote in message
news:qn********************************@4ax.com... i have a tabcontrol in my form and i have a datagrid in tab2 and want to validate the data in tab1 before the user can encode data in datagrid. i set the the datagrid1_enter event to something like this:
Private Sub DataGrid1_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.Enter If IDNo.Text = "" Then MessageBox.Show("Enter students idno information before entering school year and semester.")
Me.IDNo.Focus() End If End Sub
in order that if the idno is empty which is located in tab1 the focus will return to idno in tab1.
i used the code above w/ no luck. anyone can suggest a good way to handle setfocus?
thanks in advance
thank you very much. it works fine.
On Tue, 27 Apr 2004 11:39:27 +0200, "EricJ"
<er********@ThiSbitconsult.be.RE> wrote: 'first select the right tabpage on the tabcontrol tabcontrol.SelectedTab = tabPageYouWant 'setfocus to control on tabPageYouWant contol.setfocus
hope it helps
"jaYPee" <hi******@yahoo.com> wrote in message news:qn********************************@4ax.com.. . i have a tabcontrol in my form and i have a datagrid in tab2 and want to validate the data in tab1 before the user can encode data in datagrid. i set the the datagrid1_enter event to something like this:
Private Sub DataGrid1_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.Enter If IDNo.Text = "" Then MessageBox.Show("Enter students idno information before entering school year and semester.")
Me.IDNo.Focus() End If End Sub
in order that if the idno is empty which is located in tab1 the focus will return to idno in tab1.
i used the code above w/ no luck. anyone can suggest a good way to handle setfocus?
thanks in advance
* "EricJ" <er********@ThiSbitconsult.be.RE> scripsit: 'first select the right tabpage on the tabcontrol tabcontrol.SelectedTab = tabPageYouWant 'setfocus to control on tabPageYouWant contol.setfocus
It's 'Focus', not 'SetFocus'.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Hi Herfried,
You can type fast enough. It's 'Focus', not 'SetFocus'.
Can also as:
Hi Eric,
Probably you know, however for when it is read back on Google.
It's 'Focus', not 'SetFocus'
Herfried
:-)
Cor
* "Cor Ligthert" <no**********@planet.nl> scripsit: You can type fast enough.
It's 'Focus', not 'SetFocus'.
Can also as:
Hi Eric,
Probably you know, however for when it is read back on Google.
It's 'Focus', not 'SetFocus'
I am not "wordy", maybe because of my technical education :-).
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
i dont mind (wouldnt expect it any other way from Herfried ;) ), and i know,
it slipped past. hadn't even noticed it.
jaYPee got it working and that's wat matters most.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:c6************@ID-208219.news.uni-berlin.de... * "Cor Ligthert" <no**********@planet.nl> scripsit: You can type fast enough.
It's 'Focus', not 'SetFocus'.
Can also as:
Hi Eric,
Probably you know, however for when it is read back on Google.
It's 'Focus', not 'SetFocus'
I am not "wordy", maybe because of my technical education :-).
-- Herfried K. Wagner [MVP] <URL:http://dotnet.mvps.org/>
* "EricJ" <er********@ThiSbitconsult.be.RE> scripsit: jaYPee got it working and that's wat matters most.
Full ACK.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Tamir Khason |
last post by:
How be able to manage more deeply UI of TabControl and TabPage
For example - I want to manage border color, change color of TabPage reef,
eliminate spaces from both sides of the reef, so I bould...
|
by: Patrick McGuire |
last post by:
I want to place a tabControl with almost identical
properties on several forms. I think the best way is to
define a UserControl that inherits
System.Windows.Forms.TabControl, and place all my...
|
by: Michael Turner |
last post by:
Hi Guys
Having problem with the tab control, I need to set the background color to
something different than the standard, I have found code on the web and now
can redraw the tabpage buttons so...
|
by: Zadkin |
last post by:
Does anyone know, if it's possible to set the orientation of the
tabpagebuttons to horizontal instead of vertical when the alignment property
of my tabcontrol is set to left or right?
Thanks in...
|
by: Simon Verona |
last post by:
I have a few hundred forms in my application. All are based on a custom base form class.
I decided that I wanted to globally change the look and feel of many of the controls in my application -...
|
by: Michael R |
last post by:
TabCtrl ---
..............Tab1--Subform1
..............Tab2--Subform2---TabCtrl2---Tab21
..........................................................---Tab22...
|
by: potti |
last post by:
I tried to transfer data from 2columns in TABLE1 to TABLE2:
INSERT INTO TAB2(col1,col2) SELECT colY,colZ FROM TAB1.
It didn't work.
Pl suggest a way for this.
|
by: =?Utf-8?B?QWxleCBLLg==?= |
last post by:
Hi all
In a Visual Studio 2005 C# project, I have a simplest tabcontrol with two
tabpages. When I set tab control's Alignment property to Right, tab texts
(captions) disappear.
Does anybody...
|
by: bertie78 |
last post by:
Hi all,
New poster here! I'm having some difficulty updating a tabcontrol cross-threads.
The general idea is : the main thread is the owner of the tab control and the form controls. However, due...
|
by: antdb |
last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine
In the overall architecture, a new "hyper-convergence" concept was proposed, which integrated multiple engines and...
|
by: AndyPSV |
last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and...
|
by: Arjunsri |
last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and credentials and received a successful connection...
|
by: WisdomUfot |
last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific technical details, Gmail likely implements measures...
|
by: Matthew3360 |
last post by:
Hi,
I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web server and have made sure to enable curl. I get a...
|
by: Oralloy |
last post by:
Hello Folks,
I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA.
My problem (spelled failure) is with the synthesis of my design into a bitstream, not the C++...
|
by: Rahul1995seven |
last post by:
Introduction:
In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python has gained popularity among beginners and experts...
|
by: Ricardo de Mila |
last post by:
Dear people, good afternoon...
I have a form in msAccess with lots of controls and a specific routine must be triggered if the mouse_down event happens in any control.
Than I need to discover what...
|
by: ezappsrUS |
last post by:
Hi,
I wonder if someone knows where I am going wrong below. I have a continuous form and two labels where only one would be visible depending on the checkbox being checked or not. Below is the...
| |