FarPoint.Win Assembly > FarPoint.Win Namespace > SuperEditBase Class : IsValid Method |
'Declaration Public Overridable Function IsValid() As Boolean
'Usage Dim instance As SuperEditBase Dim value As Boolean value = instance.IsValid()
public virtual bool IsValid()
Use this method to check whether the contents of a control are valid. If the method returns true, the contents are valid.
Usually, when the InvalidOption property is set to InvalidOption.ClearData, the IsValid property returns true because the invalid data has been cleared.
privatevoidForm1_Load(objectsender,System.EventArgse) { control.Text="Hi"; control.InvalidOption=FarPoint.Win.InvalidOption.ShowData; } privatevoidcontrol_MouseDown(objectsender,System.Windows.Forms.MouseEventArgse) { boolbvalue; bvalue=control.IsValid(); if(bvalue==false) { control.Value=500; } }
PrivateSubForm1_Load(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesMyBase.Load
control.Text="Hi"
control.InvalidOption=FarPoint.Win.InvalidOption.ShowData
EndSub
PrivateSubcontrol_MouseDown(ByValsenderAsObject,ByValeAsSystem.Windows.Forms.MouseEventArgs)HandlesCurrency1.MouseDown
DimbvalueAsBoolean
bvalue=control.IsValid()
Ifbvalue=FalseThen
control.Text=500
EndIf
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