Re: How to find control with focus?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Peter Steele (psteele_at_ciena.com)
Date: 02/19/04


Date: Thu, 19 Feb 2004 12:54:34 -0800

Actually, there are no panels or groups. The text boxes are direct children
of the form and their tab stops are numbered from 1 through 4...

Peter

"Stoitcho Goutsev (100) [C# MVP]" <100@100.com> wrote in message
news:uu9Pwmw9DHA.2316@TK2MSFTNGP11.phx.gbl...
> Hi Peter,
> Probably because your textboxes are placed on a panel or other kind of
> control. Controls collection keeps references to the immediate children
> only. I suppose your textboxes are grand- or grand-grand-, etc children of
> the form.
>
> --
> B\rgds
> 100
>
> "Peter Steele" <psteele@ciena.com> wrote in message
> news:ufJVcew9DHA.2168@TK2MSFTNGP12.phx.gbl...
> > That did the trick--thanks very much. I'm curious though--why did my
loop
> > not work?
> >
> > "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
> > news:ODxsCRw9DHA.3880@TK2MSFTNGP11.phx.gbl...
> > > * "Peter Steele" <psteele@ciena.com> scripsit:
> > > > I have a form with four text fields, each with sequentially ordered
> > > > tabstops. I want to have the fields recognize the return key and
> > > > automatically shift the focus to the next control. I created the
> > following
> > > > event handler that I've assigned to the KeyUp event of each of the
> > TextBox
> > > > controls:
> > >
> > > Have a look at the form's 'ActiveControl' property.
> > >
> > > --
> > > Herfried K. Wagner [MVP]
> > > <http://www.mvps.org/dotnet>
> >
> >
>
>



Relevant Pages

  • Re: Image/area manipulation (like hot spot or image map)
    ... Thanks a lot Peter that really did what I need in the end! ... transparent buttons never came to my mind actually. ... since I already had to create 116 textboxes earlier anyway. ... the house number images always in the same position on the form. ...
    (microsoft.public.access.forms)
  • Re: Disabling the "Mouse"
    ... Peter Foot ... screen itself) and only navigate with the keyboard. ... But after learning some OOP again:) I've relized I can override the ... but on textboxes it doesn't help.. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: .net 1.1, using multiple textboxes and dropdown boxes
    ... you could use the codedom to generate the code at runtime but it would not be as clean as your code. ... I have a webform which has 4 panels. ... I get the values in those textboxes like this.... ... Is there a way similar to 'eval' in Javascript? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Skyhawk vs. Mooney
    ... Have to check your elevator fittings if they are still magnesium. ... Peter R. wrote: ... less panels to pull but most high performance singles require lube and ...
    (rec.aviation.owning)
  • ASP.NET CustomValidator on dynamic textboxes
    ... I'm creating a form that has 10 identical panels on the ... with each panel containing the same 8 textboxes for things like ... school name, address, etc, and one dropdown box. ... I've written a CustomValidator that refers to the Address textbox by ID ...
    (microsoft.public.dotnet.framework.aspnet)