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 einen Wert ab, der angibt, ob die Symbolleiste sichtbar ist, oder legt diesen fest.
Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)
Syntax
'Declaration
Public Overridable Property ToolbarVisible As Boolean
'Usage
Dim instance As PropertyGrid
Dim value As Boolean
value = instance.ToolbarVisible
instance.ToolbarVisible = value
public virtual bool ToolbarVisible { get; set; }
public:
virtual property bool ToolbarVisible {
bool get ();
void set (bool value);
}
/** @property */
public boolean get_ToolbarVisible ()
/** @property */
public void set_ToolbarVisible (boolean value)
public function get ToolbarVisible () : boolean
public function set ToolbarVisible (value : boolean)
Eigenschaftenwert
true, wenn die Symbolleiste sichtbar ist, andernfalls false. Der Standardwert ist true.
Beispiel
Im folgenden Codebeispiel wird das Initialisieren eines PropertyGrid-Steuerelements mithilfe der PropertySort-Eigenschaft und der ToolBarVisible-Eigenschaft veranschaulicht. Außerdem wird in diesem Beispiel die Visible-Eigenschaft des PropertyGrid-Steuerelements auf false festgelegt, sodass das Raster beim Ausführen des Beispiels nicht angezeigt wird. Zum Ausführen dieses Beispiels fügen Sie folgenden Code in ein Formular ein und rufen die InitializePropertyGrid-Methode im Konstruktor oder in der Load-Ereignisbehandlungsmethode des Formulars auf. Wenn Sie das Eigenschaftenraster beim Ausführen des Formulars anzeigen möchten, ändern Sie die Visible-Eigenschaft in true. Kompilieren Sie das Formular anschließend neu, und führen Sie es erneut aus.
// Declare a propertyGrid.
internal PropertyGrid propertyGrid1;
// Initialize propertyGrid1.
private void InitializePropertyGrid()
{
propertyGrid1 = new PropertyGrid();
propertyGrid1.Name = "PropertyGrid1";
propertyGrid1.Location = new System.Drawing.Point(185, 20);
propertyGrid1.Size = new System.Drawing.Size(150, 300);
propertyGrid1.TabIndex = 5;
// Set the sort to alphabetical and set Toolbar visible
// to false, so the user cannot change the sort.
propertyGrid1.PropertySort = PropertySort.Alphabetical;
propertyGrid1.ToolbarVisible = false;
propertyGrid1.Text = "Property Grid";
// Add the PropertyGrid to the form, but set its
// visibility to False so it will not appear when the form loads.
propertyGrid1.Visible = false;
this.Controls.Add(propertyGrid1);
}
// Declare a propertyGrid.
internal:
PropertyGrid^ propertyGrid1;
private:
// Initialize propertyGrid1.
[PermissionSetAttribute(SecurityAction::Demand, Name="FullTrust")]
void InitializePropertyGrid()
{
propertyGrid1 = gcnew PropertyGrid;
propertyGrid1->Name = "PropertyGrid1";
propertyGrid1->Location = System::Drawing::Point( 185, 20 );
propertyGrid1->Size = System::Drawing::Size( 150, 300 );
propertyGrid1->TabIndex = 5;
// Set the sort to alphabetical and set Toolbar visible
// to false, so the user cannot change the sort.
propertyGrid1->PropertySort = PropertySort::Alphabetical;
propertyGrid1->ToolbarVisible = false;
propertyGrid1->Text = "Property Grid";
// Add the PropertyGrid to the form, but set its
// visibility to False so it will not appear when the form loads.
propertyGrid1->Visible = false;
this->Controls->Add( propertyGrid1 );
}
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
PropertyGrid-Klasse
PropertyGrid-Member
System.Windows.Forms-Namespace