Hi Michael
The problem is that I have a group box that has a label.
Normally I set the labels tabindex to be 900+ so it doesnt matter but in
this case it does because it is not doing anything becuase it is going to
the label and then presumably on to the next control in the group box which
is ???
**********
Solved.
**********
I set the tabindex to make the label before the textbox.
Problem is that this does not always work but I can make it work.
I set the focus to the next control in the keydown event of textboxes using
getnextcontrol and canfocus.
If the next control is a label this does not work because a label cannot
receive the focus.
Thats all right. If I always set labels in group boxes (or full stop) to be
the first items then it should be ok.
Hope I explained myself all right.
Probably not.
Thanks
JB :)
[quoted text, click to view] "Michael McGuire" <Mike.McGuire@newsgroups.nospam> wrote in message
news:%23u6SnfEGEHA.4084@TK2MSFTNGP11.phx.gbl...
> In WinForms, labels can't be a tabstop, so you don't need to set the
> property.
>
> However, you can use the TabIndex property of a label to provide a
shortcut
> key to another control that does act as a TabStop however.
>
> For example:
>
> TextBox1.TabStop = true;
> TextBox1.TabIndex = 3;
>
> Label1.TabIndex = 2;
> Label1.Text = "&Some Value";
>
> In your WinForm application, hitting Control-S should put focus right into
> TextBox1. This assumes that you don't have another control with a
TabIndex
> of 3 also set and that you don't have other labels or menus with the
> Control-S shortcut setup also.
>
> "John Baro" <johnb@NOSPAMmesware.com.au> wrote in message
> news:UT1bc.135820$Wa.30328@news-server.bigpond.net.au...
> > Where is my TabStop property.
> > I want to prevent tabbing to a label.
> > In the MSDN it shows
> >
> > Label.TabStop Property
> > This member supports the .NET Framework infrastructure and is not
intended
> > to be used directly from your code.
> >
> > And sure enough it is not accessible.
> >
> > HUH?
> >
> > BJ
> >
> >
>
>