Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / March 2007

Tip: Looking for answers? Try searching our database.

tabbing not cyclic - focus disappearing completely !

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Oli - 12 Mar 2007 18:12 GMT
I have quite a complex form - build part in the designer, and part
dynamically.

The tabbing basically works - but when I tab off the last control in
my work area panel the focus disappears. no matter how many times I
subsequently press tab - it never returns......

This is tough to debug - how can now tell where the focus is (as a
first step to stopping it going there) ?

any ideas appreciated....

O.
VJ - 12 Mar 2007 19:49 GMT
I never would recommend writing code in LostFocus, but this just you could
debug. So for the final build set proper Tab Order, and create controls in
the order you want them. Or at run-time please reset TabOrder with code...

Anyways temp fix...

Just in the last control of the Form, in it's LostFoucs please write code to
SetFocus to the control you wish. So if your last control was Textbox1, and
you want to set focus to a comboxbox1.. do the below

private void textbox1_LostFocus(object sender, EventArgs e)
{
   comboxbox1.Select();
   //you could write more code to get NextControl and like that.. to
debug...
}

VJ

>I have quite a complex form - build part in the designer, and part
> dynamically.
[quoted text clipped - 9 lines]
>
> O.
Bryan Phillips - 13 Mar 2007 01:06 GMT
Have you checked your form's ActiveControl property?

--
Bryan Phillips
MCSD, MCDBA, MCSE
Blog:  http://bphillips76.spaces.live.com

> I have quite a complex form - build part in the designer, and part
> dynamically.
[quoted text clipped - 9 lines]
>
> O.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.