I'm trying to create a user control using VB .Net. The control is based on the the windows textbox and does some basic masking of input.
I created a property based on an enum value which determines the current mask for the control. When I test the control on a windows form, the property (named mask) does appear in the property list for the control, but the value of the property can not be modified. There is a drop down box which lists the enumerated values, but the selected value can not be changed. The class definition is as follows:
Public Class mtb1
Inherits System.Windows.Forms.TextBox
Public Enum tmask
None
Numeric
Phone
Capme
End Enum
Private tinmask As tmask
Public Property mask() As tmask
Get
End Get
Set(ByVal Value As tmask)
tinmask = Value
End Set
End Property
..... (all the masking code)
End Class
Does anyone know how to create a property which allows the developer to see (and select from) a list of options in that are predefined?
Any information would be greatly appreciated!
Thanks -
Rick Napolitan
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement