Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
155
handles problem
posted

i´ve tryed to manage the event got y lost focus with a textbox and everything goes rigth, when i try with a  ultraTextEditor this takes a unusual behavior (and theoretically its the same code, i just changed the name of the textbox). In fact with addHandler a cant see infragistics control in the intellisence. Could it be posible that infragistics does not support addhandler or em i have concepts problem?

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        CheckBox1.TabIndex = 0
        UltraTextEditor1.TabIndex = 1
        Label1.TabIndex = 2
    End Sub

    Private Sub a(ByVal s As Object, ByVal e As EventArgs) Handles UltraTextEditor1.GotFocus
        Label1.Text = "tiene foco"
    End Sub

    Private Sub b(ByVal s As Object, ByVal e As EventArgs) Handles UltraTextEditor1.LostFocus
        Label1.Text = "pierde foco"
    End Sub

End Class

 

 

Public Class Form2

    Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        CheckBox1.TabIndex = 0
        TextBox1.TabIndex = 1
        Label1.TabIndex = 2
    End Sub

    Private Sub a(ByVal s As Object, ByVal e As EventArgs) Handles TextBox1.GotFocus
        Label1.Text = "tiene foco"
    End Sub

    Private Sub b(ByVal s As Object, ByVal e As EventArgs) Handles TextBox1.LostFocus
        Label1.Text = "pierde foco"
    End Sub

End Class

 

 

can anyone help me to understand whats goin on?

Parents
  • 469350
    Verified Answer
    Offline posted

    You should not use GotFocus and LostFocus events. These event are directly tied to Windows messages and even Microsoft's documentation advises against using them. You should probably use the Enter and Leave events, instead.

Reply Children
No Data