SftMask/OCX 6.5

SftMaskContents.Value Property

Softel vdm, Inc.

Defines a field's contents.

Syntax       

Get

VB.NET

Val = object.Value(ByVal Index As Short)  As Object

VB

Val = object.Value(ByVal Index As Integer)  As Variant

C#.NET

object Val = object.get_Value(short Index);

VC++

_variant_t Val = object->Value[short Index];
_variant_t Val = object->GetValue(short Index);

C

HRESULT object->get_Value(short Index, VARIANT* Val);

Delphi

Val := object.Value[Index : Smallint]   : OleVariant;

Put

VB.NET

object.Value(ByVal Index As Short) = Val  As Object

VB

object.Value(ByVal Index As Integer) = Val  As Variant

C#.NET

void object.set_Value(short Index, object Val);

VC++

_variant_t object->Value[short Index] = Val;
void object->PutValue(short Index, const _variant_t& Val);

C

HRESULT object->put_Value(short Index, VARIANT Val);

Delphi

object.Value[Index : Smallint] := Val   : OleVariant;

object

A SftMaskContents object.

Index

The index of the variable as defined using the !number value token (see Mask property).

Val

A Variant defining the contents of the input positions or fields as defined using the !number value token (see Mask property).

Comments

The Value property defines a field's contents.

The Value property can be used to retrieve and set portions of a Masked Edit control’s contents without knowing the exact position of the data. The Mask property is defined with the value token !number. Up to 10 value tokens can be used in a single mask.

When setting the Value property, the string defined using Val replaces the current contents of the portion of the mask defined by the matching value token. Based on the ClipMode property, literals may be present. In any case, if characters in the new string Val are not acceptable based on the defined input mask, they are simply ignored.

Date/time input fields can be retrieved and set using the Contents.DateTime property.


Feedback / comments / error reports for this topic
© 2000, 2008 - Softel vdm, Inc. - www.softelvdm.com