FontDialog.ShowApply プロパティ
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

Dim instance As FontDialog Dim value As Boolean value = instance.ShowApply instance.ShowApply = value
/** @property */ public boolean get_ShowApply () /** @property */ public void set_ShowApply (boolean value)
ダイアログ ボックスに [適用] ボタンを表示する場合は true。それ以外の場合は false。既定値は false です。

FontDialog での選択を RichTextBox 内のテキストに適用する方法を次のコード例に示します。この例では、ダイアログ ボックスを表示するイベント ハンドラで ShowApply プロパティを true に初期化してから FontDialog を表示しています。Apply イベント ハンドラで、Font プロパティは Control.Font プロパティに代入されます。
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

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- FontDialog.ShowApply プロパティのページへのリンク