"Guido Kraus" <guido.kraus@newsgroup.nospam> schrieb:
>I have designed a custom control derived from UserControl which contains a
> LinkLabel and a TextBox. If the user uses the TAB key to move the focus to
[quoted text clipped - 5 lines]
> the TabStop property of the LinkLabel is ignored and it still gets the
> focus.
I am not able to reproduce this behavior with .NET 1.1/Windows XP
Professional SP2.

Signature
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Guido Kraus - 01 Apr 2005 13:21 GMT
You are right. I was fooled by the TabStop property of the LinkLabel which is
automatically set to True if you change the Text property of the LinkLabel.
My custom control exposes a LinkText property which sets the text of the
LinkLabel. Therefore the container of my custom control silently activated
the TabStop property by setting the text of the LinkLabel. So the simple
solution to the problem is:
Public Property LinkText() As String
Get
Return lnkLink.Text
End Get
Set(ByVal Value As String)
lnkLink.Text = Value
lnkLink.TabStop = False
End Set
End Property
> "Guido Kraus" <guido.kraus@newsgroup.nospam> schrieb:
> >I have designed a custom control derived from UserControl which contains a
[quoted text clipped - 9 lines]
> I am not able to reproduce this behavior with .NET 1.1/Windows XP
> Professional SP2.
Kevin Yu [MSFT] - 02 Apr 2005 03:29 GMT
Hi Guido,
It was nice hear that you have had the problem resolved. Thanks for sharing
your experience with all the people here. If you have any questions, please
feel free to post them in the community.
Kevin Yu

Signature
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."