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

Dim instance As ToolStripButton Dim value As Boolean value = instance.Checked instance.Checked = value
/** @property */ public boolean get_Checked () /** @property */ public void set_Checked (boolean value)
ToolStripButton が押された状態または押されていない状態の場合は true。それ以外の場合は false。既定値は false です。

CheckOnClick プロパティを true に設定し、CheckedChanged のイベントで Checked プロパティを使用して、ボタンがクリックされたときにボタンのテキストのフォントを太字に変更するコード例を次に示します。
Friend WithEvents boldButton As ToolStripButton Private Sub InitializeBoldButton() boldButton = New ToolStripButton() boldButton.Text = "B" boldButton.CheckOnClick = True toolStrip1.Items.Add(boldButton) End Sub Private Sub boldButton_CheckedChanged(ByVal sender As [Object], _ ByVal e As EventArgs) Handles boldButton.CheckedChanged If boldButton.Checked Then Me.Font = New Font(Me.Font, FontStyle.Bold) Else Me.Font = New Font(Me.Font, FontStyle.Regular) End If End Sub
internal ToolStripButton boldButton; private void InitializeBoldButton() { boldButton = new ToolStripButton(); boldButton.Text = "B"; boldButton.CheckOnClick = true; toolStrip1.Items.Add(boldButton); } private void boldButton_CheckedChanged(object sender, EventArgs e) { if (boldButton.Checked) { this.Font = new Font(this.Font, FontStyle.Bold); } else { this.Font = new Font(this.Font, FontStyle.Regular); } }

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からToolStripButton.Checked プロパティを検索する場合は、下記のリンクをクリックしてください。

- ToolStripButton.Checked プロパティのページへのリンク