Spread Windows Forms 7.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 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

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