FarPoint.Win Assembly > FarPoint.Win Namespace > SuperEditBase Class : UserEntry Property |
'Declaration Public Overridable Property UserEntry As UserEntry
'Usage Dim instance As SuperEditBase Dim value As UserEntry instance.UserEntry = value value = instance.UserEntry
public virtual UserEntry UserEntry {get; set;}
This property either blocks invalid characters from being provided to the control or lets the user or code provide any value. What makes a character valid depends on the control and its property settings.
When this property is set to UserEntry.Formatted, the control validates every character when it is provided to the control, whether from a user typing or pasting or from code or a database. The control blocks any character that does not fit its criteria for valid characters, and a UserError event occurs.
When this property is set to UserEntry.FreeFormat, the control accepts any provided data.
All edit controls can validate supplied data when they lose the focus. If a control contains an invalid character or a value otherwise considered invalid when it loses the focus, an InvalidData event occurs. The control does not format the invalid value. If the value is valid, the control formats it, adding the defined symbols, such as a currency symbol, as specified by the related property settings.
This property is available from the SuperEditBase class.
privatevoidForm1_Load(objectsender,System.EventArgse) { control.InvalidOption=FarPoint.Win.InvalidOption.HideData; control.InvalidColor=Color.Blue; control.UserEntry=FarPoint.Win.UserEntry.FreeFormat; control.CausesValidation=true; control.Text="InvalidColor"; } privatevoidbutton1_Click(objectsender,System.EventArgse) { control.ResetInvalidColor(); }
PrivateSubForm1_Load(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesMyBase.Load control.InvalidOption=FarPoint.Win.InvalidOption.HideData control.InvalidColor=Color.Blue control.UserEntry=FarPoint.Win.UserEntry.FreeFormat control.CausesValidation=True control.Text="InvalidColor" EndSub PrivateSubButton1_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesButton1.Click control.ResetInvalidColor() EndSub
Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10