PC Review


Reply
Thread Tools Rate Thread

Control question

 
 
web1110
Guest
Posts: n/a
 
      14th Mar 2005
Hi y'all,

When I make a control visible that has several subordinate controls in it,
how can I direct the focuss to the first subcontrol.

Thanx,
Bill


 
Reply With Quote
 
 
 
 
Derek Harmon
Guest
Posts: n/a
 
      15th Mar 2005
"web1110" <(E-Mail Removed)> wrote in message news:JLCdnUqXXtz3vavfRVn-(E-Mail Removed)...
> When I make a control visible that has several subordinate controls in it,
> how can I direct the focuss to the first subcontrol.


Locate the first subcontrol on your containingControl,

Control subcontrol = containingControl.Controls[ 0];

Next, provided subcontrol is Visible and Enabled (it returns
true when you check subcontrol.CanFocus) you call its
Focus( ) method,

bool gotFocus = subcontrol.Focus( );


Derek Harmon


 
Reply With Quote
 
web1110
Guest
Posts: n/a
 
      15th Mar 2005

Thanx, that worked fine.

One more follow up. How did I identify the subcontrol that currently has
the focus?

Thanx again,
Bill


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Some question about web control and the old HTML control Tony Johansson Microsoft ASP .NET 2 1st Dec 2010 12:17 PM
question on best way to get a control's property from custom control TS Microsoft ASP .NET 5 6th Jul 2007 02:41 AM
Selecting control on userform with part of control name (set question) Keith Microsoft Excel Programming 4 10th Jan 2007 02:24 PM
Dynamic Controls in User Control; page/control lifecycle question Frankie Microsoft ASP .NET 2 23rd Jun 2005 05:07 PM
question anbout control.invoke and control.begininvoke C# Microsoft Dot NET Framework Forms 4 24th May 2004 09:45 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:50 AM.