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 das Dialogfeld die Schaltfläche Übernehmen enthält, oder legt diesen fest.
Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)
Syntax
'Declaration
Public Property ShowApply As Boolean
'Usage
Dim instance As FontDialog
Dim value As Boolean
value = instance.ShowApply
instance.ShowApply = value
public bool ShowApply { get; set; }
public:
property bool ShowApply {
bool get ();
void set (bool value);
}
/** @property */
public boolean get_ShowApply ()
/** @property */
public void set_ShowApply (boolean value)
public function get ShowApply () : boolean
public function set ShowApply (value : boolean)
Eigenschaftenwert
true, wenn das Dialogfeld die Schaltfläche Übernehmen enthält, andernfalls false. Der Standardwert ist false.
Beispiel
Im folgenden Codebeispiel wird veranschaulicht, wie die Auswahl in einem FontDialog auf den Text in einer RichTextBox angewendet wird. Im Ereignishandler, der das Dialogfeld anzeigt, wird durch das Beispiel die ShowApply-Eigenschaft auf true initialisiert und dann das FontDialog angezeigt. Im Apply-Ereignishandler wird die Font-Eigenschaft der Control.Font-Eigenschaft zugewiesen.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
' Sets the ShowApply property, then displays the dialog.
FontDialog1.ShowApply = True
FontDialog1.ShowDialog()
End Sub
Private Sub FontDialog1_Apply(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FontDialog1.Apply
' Applies the selected font to the selected text.
RichTextBox1.SelectionFont = FontDialog1.Font
End Sub
private void button1_Click(object sender, System.EventArgs e)
{
// Sets the ShowApply property, then displays the dialog.
fontDialog1.ShowApply = true;
fontDialog1.ShowDialog();
}
private void fontDialog1_Apply(object sender, System.EventArgs e)
{
// Applies the selected font to the selected text.
richTextBox1.Font = fontDialog1.Font;
}
private:
void button1_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ )
{
// Sets the ShowApply property, then displays the dialog.
fontDialog1->ShowApply = true;
fontDialog1->ShowDialog();
}
void fontDialog1_Apply( Object^ /*sender*/, System::EventArgs^ /*e*/ )
{
// Applies the selected font to the selected text.
richTextBox1->Font = fontDialog1->Font;
}
private void button1_Click(Object sender, System.EventArgs e)
{
// Sets the ShowApply property, then displays the dialog.
fontDialog1.set_ShowApply(true);
fontDialog1.ShowDialog();
} //button1_Click
private void fontDialog1_Apply(Object sender, System.EventArgs e)
{
// Applies the selected font to the selected text.
richTextBox1.set_Font(fontDialog1.get_Font());
} //fontDialog1_Apply
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
FontDialog-Klasse
FontDialog-Member
System.Windows.Forms-Namespace
ShowColor
ShowEffects
ShowHelp