Spread Windows Forms 6.0 Product Documentation
IsNull Method
See Also  Example Support Options
FarPoint.Win Assembly > FarPoint.Win Namespace > SuperEditBase Class : IsNull Method


Glossary Item Box

Gets whether the control contains a null value.

Syntax

Visual Basic (Declaration) 
Public Overridable Function IsNull() As Boolean
Visual Basic (Usage)Copy Code
Dim instance As SuperEditBase
Dim value As Boolean
 
value = instance.IsNull()
C# 
public virtual bool IsNull()

Return Value

true if the control contains the null value; false otherwise

Remarks

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:

  • Press F2.
  • Delete the contents of the control.
  • Call the SetNull method.
  • Call the ClearAll method.
  • Select the contents of the control and call the Clear method.

The AllowNull property must be set to true for the IsNull method and NullColor property to work correctly.

Example

C#Copy Code
privatevoidForm1_Load(objectsender,System.EventArgse)
{
control.AllowNull=true;
}

privatevoidcontrol_MouseDown(objectsender,System.Windows.Forms.MouseEventArgse)
{
boolbvalue;
bvalue=control.IsNull();
if(bvalue)
{
control.Value=500;
}
}
Visual BasicCopy Code
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

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

© 2002-2012 ComponentOne, a division of GrapeCity. All Rights Reserved.