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.

Focus on Usercontrols

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul Werkowitz - 26 Mar 2007 09:38 GMT
Hello Netizens,

I have a UserControl with some editcontrols on it. Now when the user enters
some data, one of these children does have focus. It can happen that the
usercontrol looses focus - and later gets it back.- I then want to put the
input focus back to the child that had it before..... How can I do that?

Any help appreciated
Paule
VJ - 26 Mar 2007 15:30 GMT
this.ActiveControl - gives the foucs of the current active control in "this"
i.e your usercontrol instance. So store it and lost foucs of user control in
a memeber variable. and then in gotFocus of usercontrol do..
control.Select(). Assuming you stored last selected in control

VJ

> Hello Netizens,
>
[quoted text clipped - 6 lines]
> Any help appreciated
> Paule
Paul Werkowitz - 27 Mar 2007 08:14 GMT
Am Mon, 26 Mar 2007 09:30:12 -0500 schrieb VJ:

> this.ActiveControl - gives the foucs of the current active control in "this"
> i.e your usercontrol instance. So store it and lost foucs of user control in
> a memeber variable. and then in gotFocus of usercontrol do..
> control.Select(). Assuming you stored last selected in control

Tnx for the info. I hoped to be able to avoid to do it manually.

Greetz
Paule

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.