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

ユーザーがオペレーティング システムで visual スタイルを有効にしており、アプリケーション ウィンドウのクライアント領域に visual スタイルが適用されている場合は true。それ以外の場合は false。


IsSupported プロパティを使用して、ComboBoxRenderer メソッドを使用するかどうかを決定するコード例を次に示します。このコード例は、ComboBoxRenderer クラスのトピックで取り上げているコード例の一部分です。
' Draw the combo box in the current state. Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs) MyBase.OnPaint(e) If Not ComboBoxRenderer.IsSupported Then Me.Parent.Text = "Visual Styles Disabled" Return End If Me.Parent.Text = "CustomComboBox Enabled" ' Always draw the main text box and drop down arrow in their ' current states. ComboBoxRenderer.DrawTextBox(e.Graphics, topTextBoxRectangle, _ Me.Text, Me.Font, textBoxState) ComboBoxRenderer.DrawDropDownButton(e.Graphics, arrowRectangle, _ arrowState) ' Only draw the bottom text box if the arrow has been clicked. If isActivated Then ComboBoxRenderer.DrawTextBox(e.Graphics, _ bottomTextBoxRectangle, bottomText, Me.Font, textBoxState) End If End Sub
// Draw the combo box in the current state. protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); if (!ComboBoxRenderer.IsSupported) { this.Parent.Text = "Visual Styles Disabled"; return; } this.Parent.Text = "CustomComboBox Enabled"; // Always draw the main text box and drop down arrow in their // current states ComboBoxRenderer.DrawTextBox(e.Graphics, topTextBoxRectangle, this.Text, this.Font, textBoxState); ComboBoxRenderer.DrawDropDownButton(e.Graphics, arrowRectangle, arrowState); // Only draw the bottom text box if the arrow has been clicked if (isActivated) { ComboBoxRenderer.DrawTextBox(e.Graphics, bottomTextBoxRectangle, bottomText, this.Font, textBoxState); } }
// Draw the combo box in the current state. protected: virtual void OnPaint(PaintEventArgs^ e) override { Control::OnPaint(e); if (!ComboBoxRenderer::IsSupported) { this->Parent->Text = "Visual Styles Disabled"; return; } this->Parent->Text = "CustomComboBox Enabled"; // Always draw the main text box and drop down arrow in their // current states ComboBoxRenderer::DrawTextBox(e->Graphics, topTextBoxRectangle, this->Text, this->Font, textBoxState); ComboBoxRenderer::DrawDropDownButton(e->Graphics, arrowRectangle, arrowState); // Only draw the bottom text box if the arrow has been clicked if (isActivated) { ComboBoxRenderer::DrawTextBox(e->Graphics, bottomTextBoxRectangle, bottomText, this->Font , textBoxState); } }

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に収録されているすべての辞書からComboBoxRenderer.IsSupported プロパティを検索する場合は、下記のリンクをクリックしてください。

- ComboBoxRenderer.IsSupported プロパティのページへのリンク