ComboBoxRenderer.IsSupported プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ComboBoxRenderer.IsSupported プロパティの意味・解説 

ComboBoxRenderer.IsSupported プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

visual スタイル使用してコンボ ボックス描画するために、ComboBoxRenderer クラス使用できるかどうかを示す値を取得します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

解説解説

このプロパティfalse場合、DrawTextBox メソッドまたは DrawDropDownButton メソッドが InvalidOperationException をスローます。

使用例使用例

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);
        }
    }
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ComboBoxRenderer クラス
ComboBoxRenderer メンバ
System.Windows.Forms 名前空間
Application.VisualStyleState プロパティ


このページでは「.NET Framework クラス ライブラリ リファレンス」からComboBoxRenderer.IsSupported プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からComboBoxRenderer.IsSupported プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からComboBoxRenderer.IsSupported プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「ComboBoxRenderer.IsSupported プロパティ」の関連用語

ComboBoxRenderer.IsSupported プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ComboBoxRenderer.IsSupported プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS