Re: auto tab from textbox

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



Well, Control.GetNextControl is a static control that should work even from inside your Custom control although I haven't tested this.

Control c = Control.GetNextControl(this, true);
c.Focus();



On Thu, 22 Sep 2005 22:54:06 +0200, ScottGX <ScottGX@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

I want to use this control on all of our forms, so I made a custom textbox
control.  How did I get reference to the other controls on the form from this
custom textbox?  Thanks for the help!

"Morten Wennevik" wrote:

Hi Scott,

Try the Control.GetNextControl method.  It will give you the next control in the tab order, then simply Focus() the next control.

On Thu, 22 Sep 2005 18:06:05 +0200, ScottGX <ScottGX@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

> Is there a good way to automatically tab to the next control when the user
> has typed in the max characters into a textbox?  The idea is to flow from one
> text box to another without the user having to use their mouse or tab key.
>



--
Happy coding!
Morten Wennevik [C# MVP]





-- Happy coding! Morten Wennevik [C# MVP] .



Relevant Pages

  • Re: Control Tip Text
    ... Control Tip Text would change automatically. ... I wanted the Control Tip Text on the 'Reference' control to be the ... The coding below does this in part: ... I do not know of any kind of magic selector or even how to use mental ...
    (microsoft.public.access.formscoding)
  • Re: Default values
    ... Reference Hyperlink ... I want the Reference to be automatically updated from inputs, ... I'd be grateful for any help with coding for ... Default value or Control. ...
    (microsoft.public.access.gettingstarted)
  • Re: Help on error message
    ... this error happens when you use the Text Property of the Control. ... "Wylie C" wrote in message ... > I have just started getting the following error message in my coding ... > You can't reference a property or method for a contol unless the control ...
    (microsoft.public.access.forms)
  • Re: Codings not changed when a control is renamed in VS2005.
    ... That's true, because in .NET, subroutine names for event are not considered important. ... When I rename the button from Button1 to YesButton, ... the coding, how can he/she knows Button1_Click is for the YesButton? ... should update all references to a control name. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Enumerated List of Formats
    ... The user would be setting a property on my custom textbox user control. ... The last thing the control does is set the format to what is desired once ... Private Enum tbFormat ...
    (microsoft.public.vb.general.discussion)