Sorry I didn't include a code example to what I mean. We have numerous controls that inherit from Microsoft System.Windows.Forms.xyz to Telerix controls. We override many OnEvent methods, and it was concerning that these did not fire when I moved them to Telerik controls. I'm wondering if there is a list of OnEvent methods that don't do what I'd expect, similarly if there is a list of events that do not fire in Telerik controls that would fire in System.Windows.Forms controls.
This is following a nice pattern. However the RadTextBox1 has the following output, that does not follow a similar pattern.
It looks like it's a bit of a mess with what I should be overriding, or listening to events.
Imports Telerik.WinControls.UI
Public Class Form5
Inherits System.Windows.Forms.Form
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.RadTextBox1 = New RadicalTextBox()
Me.ListBox1 = New System.Windows.Forms.ListBox()
Me.TextBox1 = New BoringTextBox()
CType(Me.RadTextBox1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'RadTextBox1
'
Me.RadTextBox1.Location = New System.Drawing.Point(41, 25)
Me.RadTextBox1.Name = "RadTextBox1"
Me.RadTextBox1.Size = New System.Drawing.Size(100, 20)
Me.RadTextBox1.TabIndex = 1
Me.RadTextBox1.TabStop = False
Me.RadTextBox1.Text = "RadTextBox1"
'
'ListBox1
'
Me.ListBox1.FormattingEnabled = True
Me.ListBox1.Location = New System.Drawing.Point(21, 51)
Me.ListBox1.Name = "ListBox1"
Me.ListBox1.Size = New System.Drawing.Size(234, 186)
Me.ListBox1.TabIndex = 0
'
'TextBox1
'
Me.TextBox1.Location = New System.Drawing.Point(155, 25)
Me.TextBox1.Name = "TextBox1"
Me.TextBox1.Size = New System.Drawing.Size(100, 20)
Me.TextBox1.TabIndex = 2
Me.TextBox1.TabStop = False
Me.TextBox1.Text = "TextBox1"
'
'Form5
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(292, 273)
Me.Controls.Add(Me.ListBox1)
Me.Controls.Add(Me.TextBox1)
Me.Controls.Add(Me.RadTextBox1)
Me.Name = "Form5"
Me.Text = "Form5"
CType(Me.RadTextBox1, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents RadTextBox1 As RadicalTextBox
Friend WithEvents ListBox1 As System.Windows.Forms.ListBox
Friend WithEvents TextBox1 As BoringTextBox
Public Shared lb As ListBox
Private Sub Form5_Load(sender As Object, e As System.EventArgs) Handles Me.Load
lb = ListBox1
lb.Focus()
End Sub
End Class
Public Class RadicalTextBox
Inherits RadTextBox
Public Overrides Property ThemeClassName As String
Get
Return GetType(RadTextBox).FullName
End Get
Set(value As String)
MyBase.ThemeClassName = value
End Set
End Property
Protected Overrides Sub OnKeyUp(e As System.Windows.Forms.KeyEventArgs)
Form5.lb.Items.Add("OnKeyUp " + Me.Name)
System.Console.WriteLine("OnKeyUp " + Me.Name)
MyBase.OnKeyUp(e)
End Sub
Protected Overrides Sub OnKeyDown(e As System.Windows.Forms.KeyEventArgs)
Form5.lb.Items.Add("OnKeyDown " + Me.Name)
System.Console.WriteLine("OnKeyDown " + Me.Name)
MyBase.OnKeyDown(e)
End Sub
Protected Overrides Sub OnKeyPress(e As System.Windows.Forms.KeyPressEventArgs)
Form5.lb.Items.Add("OnKeyPress " + Me.Name)
System.Console.WriteLine("OnKeyPress " + Me.Name)
MyBase.OnKeyPress(e)
End Sub
Protected Overrides Sub OnEnter(e As System.EventArgs)
Form5.lb.Items.Add("OnEnter " + Me.Name)
System.Console.WriteLine("OnEnter " + Me.Name)
MyBase.OnEnter(e)
End Sub
Private Sub RadicalTextBox_Enter(sender As Object, e As System.EventArgs) Handles Me.Enter
Form5.lb.Items.Add("Enter " + Me.Name)
End Sub
Private Sub RadicalTextBox_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
Form5.lb.Items.Add("KeyDown " + Me.Name)
System.Console.WriteLine("KeyDown " + Me.Name)
End Sub
Private Sub RadicalTextBox_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
Form5.lb.Items.Add("KeyPress " + Me.Name)
System.Console.WriteLine("KeyPress " + Me.Name)
End Sub
Private Sub RadicalTextBox_KeyUp(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyUp
Form5.lb.Items.Add("KeyUp " + Me.Name)
System.Console.WriteLine("KeyUp " + Me.Name)
End Sub
End Class
Public Class BoringTextBox
Inherits TextBox
Protected Overrides Sub OnKeyUp(e As System.Windows.Forms.KeyEventArgs)
Form5.lb.Items.Add("OnKeyUp " + Me.Name)
System.Console.WriteLine("OnKeyUp " + Me.Name)
MyBase.OnKeyUp(e)
End Sub
Protected Overrides Sub OnKeyDown(e As System.Windows.Forms.KeyEventArgs)
Form5.lb.Items.Add("OnKeyDown " + Me.Name)
System.Console.WriteLine("OnKeyDown " + Me.Name)
MyBase.OnKeyDown(e)
End Sub
Protected Overrides Sub OnKeyPress(e As System.Windows.Forms.KeyPressEventArgs)
Form5.lb.Items.Add("OnKeyPress " + Me.Name)
System.Console.WriteLine("OnKeyPress " + Me.Name)
MyBase.OnKeyPress(e)
End Sub
Protected Overrides Sub OnEnter(e As System.EventArgs)
Form5.lb.Items.Add("OnEnter " + Me.Name)
System.Console.WriteLine("OnEnter " + Me.Name)
MyBase.OnEnter(e)
End Sub
Private Sub BoringTextBox_Enter(sender As Object, e As System.EventArgs) Handles Me.Enter
Form5.lb.Items.Add("Enter " + Me.Name)
System.Console.WriteLine("Enter " + Me.Name)
End Sub
Private Sub BoringTextBox_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
Form5.lb.Items.Add("KeyDown " + Me.Name)
System.Console.WriteLine("KeyDown " + Me.Name)
End Sub
Private Sub BoringTextBox_KeyPress(sender As Object, e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress
Form5.lb.Items.Add("KeyPress " + Me.Name)
System.Console.WriteLine("KeyPress " + Me.Name)
End Sub
Private Sub BoringTextBox_KeyUp(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyUp
Form5.lb.Items.Add("KeyUp " + Me.Name)
System.Console.WriteLine("KeyUp " + Me.Name)
End Sub
End Class
My experience with .Net is 7 years. My experience with Rad is about 2 weeks.