Dear all,

i am building a small control that inherits from the textbox, i am doing this so that i can preset some properties of the textbox so that when i drag them into my form in design view i dont need to adjust each one properties.


the problem is with the text property.

here is my code for the control


VB Code:
  1. Public Class mytxtbox
  2.     Inherits System.Windows.Forms.TextBox
  3.     Sub New()
  4.         MyBase.New()
  5.         Me.MaxLength = 10
  6.         Me.Text = 0
  7.         Me.RightToLeft = Windows.Forms.RightToLeft.Yes
  8.  
  9.     End Sub


now when i drag the new control from the toolbox to my form it is pulled down with all the properties setup as i want Except for the text propert
it is always mytxtbox1 instead of 0 as i preset it in the new sub


Waiting ur answer

RGDS