FarPoint.Win Assembly > FarPoint.Win Namespace > SuperEditBase Class : IsNull Method |
'Declaration Public Overridable Function IsNull() As Boolean
'Usage Dim instance As SuperEditBase Dim value As Boolean value = instance.IsNull()
public virtual bool IsNull()
When this property returns true, the control contains the null value.
When the AllowNull property is set to true, the control accepts null values, and the user can provide a null value in the following ways:
The AllowNull property must be set to true for the IsNull method and NullColor property to work correctly.
privatevoidForm1_Load(objectsender,System.EventArgse) { control.AllowNull=true; } privatevoidcontrol_MouseDown(objectsender,System.Windows.Forms.MouseEventArgse) { boolbvalue; bvalue=control.IsNull(); if(bvalue) { control.Value=500; } }
PrivateSubForm1_Load(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesMyBase.Load
control.AllowNull=True
EndSub
PrivateSubcontrol_MouseDown(ByValsenderAsObject,ByValeAsSystem.Windows.Forms.MouseEventArgs)HandlesCurrency1.MouseDown
DimbvalueAsBoolean
bvalue=control.IsNull()
IfbvalueThen
control.Text=500
EndIf
EndSub
Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8