Reputation: 87
It is possible to override textbox properties like selectionstart property
Upvotes: 0
Views: 2716
Reputation: 2064
Yes you can by creating your own textbox class, such as
Class MyTextBox
Inherits TextBox
Public Shadows Property SelectionStart As Integer
Get
' Get Code
End Get
Set(ByVal value As Integer)
' Set code
End Set
End Property
End Class
Upvotes: 3
Reputation: 5885
SelectionStart
property is not marked as virtual
, so you can not override it. Other properties that are virtual
or overridable
can be overridden.
Upvotes: 1
Reputation: 7794
You can create your own custom control that inherits from the textbox control and override whatever events you need to. Here is some guidance from MSDN.
Upvotes: 1