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:
Public Class mytxtbox Inherits System.Windows.Forms.TextBox Sub New() MyBase.New() Me.MaxLength = 10 Me.Text = 0 Me.RightToLeft = Windows.Forms.RightToLeft.Yes 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




Reply With Quote