Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27329

tabstop programmatically

$
0
0
Hi All

I created form in WPF application. That form has some TextBox field. When I enter unique number in TextBox1 and that number exists in database rest TextBox fields received according binding data for those fields when I click Tab button. I would like to stop cursor on TextBox2 if field doesn't get data and skip Teif it get data 0. Look is very simple but I cannot figure out why it doesn't work in my case.
Code:

Private Sub TextBox1_LostFocus(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles TextBox1.LostFocus
        If cvTest.Count > 0 Then
            If Me.TextBox2.Text = ""
                Me.TextBox2.IsTabStop = True
            Else
                Me.TextBox2.IsTabStop = False
        End If
End Sub

where cvTest collection view. When I press Tab key when cursor in TextBox1, the cursor stop in TextBox2 in any cases. Why? How to fix that simple problem?

Thanks.

Viewing all articles
Browse latest Browse all 27329

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>