Spread Windows Forms 6.0 Product Documentation
Name Property
See Also  Support Options
FarPoint.Win Assembly > FarPoint.Win Namespace > ElementControl Class : Name Property


Glossary Item Box

Gets or sets the name used in code to identify the control.

Syntax

Visual Basic (Declaration) 
Public Shadows Property Name As String
Visual Basic (Usage)Copy Code
Dim instance As ElementControl
Dim value As String
 
instance.Name = value
 
value = instance.Name
C# 
public new string Name {get; set;}

Property Value

String containing the name of the control

Remarks

The name of a control must start with a letter and can contain a maximum of 40 characters. It can include numbers and underscore characters, but it cannot include punctuation or spaces. Different controls used on the same form cannot share the same name.

Notes:
  • Although some controls use the Name property value as the default value for the Text property, changing either property does not affect the other.
  • For more information, see the Name property in the Microsoft .NET Framework Reference.

You cannot change the name of a control at run time.

Note: Changing the name of a control can affect existing code that uses the name.

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.