Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Ruft den Text der Fensterbeschriftung des Datenblatts ab oder legt diesen fest.
Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)
Syntax
'Declaration
<LocalizableAttribute(True)> _
Public Property CaptionText As String
'Usage
Dim instance As DataGrid
Dim value As String
value = instance.CaptionText
instance.CaptionText = value
[LocalizableAttribute(true)]
public string CaptionText { get; set; }
[LocalizableAttribute(true)]
public:
property String^ CaptionText {
String^ get ();
void set (String^ value);
}
/** @property */
public String get_CaptionText ()
/** @property */
public void set_CaptionText (String value)
public function get CaptionText () : String
public function set CaptionText (value : String)
Eigenschaftenwert
Eine Zeichenfolge, die als Fensterbeschriftung des Datenblatts angezeigt werden soll. Der Standardwert ist eine leere Zeichenfolge ("").
Beispiel
Im folgenden Codebeispiel wird die Beschriftung eines System.Windows.Forms.DataGrid festgelegt.
If DataGrid1.CaptionText = "" Then
DataGrid1.CaptionText = "Microsoft DataGrid"
End If
if(dataGrid1.CaptionText == "")
dataGrid1.CaptionText = "Microsoft DataGrid";
if ( dataGrid1->CaptionText == "" )
{
dataGrid1->CaptionText = "Microsoft DataGrid";
}
if (dataGrid1.get_CaptionText().Equals("")) {
dataGrid1.set_CaptionText("Microsoft DataGrid");
}
Plattformen
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Mobile für Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.
Versionsinformationen
.NET Framework
Unterstützt in: 2.0, 1.1, 1.0
Siehe auch
Referenz
DataGrid-Klasse
DataGrid-Member
System.Windows.Forms-Namespace
CaptionVisible
DataGrid.CaptionForeColor-Eigenschaft
DataGrid.CaptionFont-Eigenschaft
DataGrid.CaptionBackColor-Eigenschaft