473,406 Members | 2,343 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,406 software developers and data experts.

How do I set the focus on a particular tab in a tab control?

I'm trying to check to see that all fields in a particular tab are filled in
(this I do with the "Leave" event handler... the code checks whether any of
the textboxes on that particular tab are empty, then displays a messagebox to
ask the user to ensure that all tabs are filled in. I just can't figure out
how to return the focus to the tab in question. Please help.
--
Dazed and confused
Aug 3 '07 #1
2 1370

"Mucky" <fe***************@hotmail.comschrieb im Newsbeitrag
news:AB**********************************@microsof t.com...
I'm trying to check to see that all fields in a particular tab are filled
in
(this I do with the "Leave" event handler... the code checks whether any
of
the textboxes on that particular tab are empty, then displays a messagebox
to
ask the user to ensure that all tabs are filled in. I just can't figure
out
how to return the focus to the tab in question. Please help.
--
Dazed and confused
Dear Mucky,

check this out. Once someone asked the same question
in the german csharp newsgroup. I wrote the answer in
german but the code is is in english:

Selecting the Tab at runtime Example:
-----------------------------

this.tabControlMainConfig.SelectedTab = this.tabPageExternalApplications;

Here is OP:

http://groups.google.de/group/micros...73b5035b04c15f

Beste Grüsse / Best regards / Votre bien devoue

Kerem Gümrükcü
ke*****@pro-it-education.de
Pro-IT Education http://www.pro-it-education.de/
Professional IT-Training and Consulting
-----------------------
"This reply is provided as is, without warranty express or implied."
Aug 4 '07 #2
Does

tabs.SelectedTab = myTabPageToSetFocusTo

work for you?
"Mucky" <fe***************@hotmail.comwrote in message
news:AB**********************************@microsof t.com...
I'm trying to check to see that all fields in a particular tab are filled
in
(this I do with the "Leave" event handler... the code checks whether any
of
the textboxes on that particular tab are empty, then displays a messagebox
to
ask the user to ensure that all tabs are filled in. I just can't figure
out
how to return the focus to the tab in question. Please help.
--
Dazed and confused

Aug 4 '07 #3

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

Similar topics

3
by: Nemesis | last post by:
I've been up most of the night trying to get the basic searcg (find record) facility to pre focus on a particular fielf so that it only searches that field and returns the data for the whole form....
1
by: Jason Huang | last post by:
Hi, private void SetFocus(Control ctrl) // SetFocus to a particular control { string focusScript = "<script language='javascript' id='FocusScript'> " + "document.getElementById('" +...
6
by: Mike | last post by:
I have a few textbox controls that have autopostback so that when they loose focus they update a label control that shows the count of characters in their respective text control. This works fine,...
3
by: Joe Delphi | last post by:
Hi, I have more experience working with Windows.Forms than with WebForms and sometimes it trips me up. When my page loads, I want a particular textbox to have the focus. I am attempting to...
18
by: Euphor2 | last post by:
I'm in school, taking a VB .NET 2003 course, and the teacher taught us how to use Sender.Focus() to return focus to the control from which focus was received. However, when I got home, and tried...
2
by: Jack Russell | last post by:
I have a form containing a tab control I want focus set to a particular text box when the form opens. However doing this in the load form event If TabControl1.SelectedIndex = 0 Then If...
3
by: Tedmond | last post by:
Hi all, Can anyone tell me how to set focus to particular control on Page_Load() in ASP.Net? I could not find any Control.Focus() method. Thanks for any help! Tedmond
4
by: Jon Slaughter | last post by:
Is there any method to temporarily disable focus changing?(I assume only method is tab or mouse?) This problem has been tieing me up for a while and nothing seems to work. The only thing that I...
0
by: samadams_2006 | last post by:
Hello, I have a VB.NET Form which has a System.Windows.Forms.TabControl on it. This TabControl has 5 Tabs on it. On each tab, I have various textboxes, option boxes, radio boxes, etc. I would...
3
Wolfling
by: Wolfling | last post by:
I have a small VB6 app that uses an InternetExplorer control to retrieve some information from a website. It uses a polling technique (eg check the website every 60 seconds). My app remains hidden...
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.