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

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

DropDownList.BorderColor プロパティ

コントロール境界線の色を取得または設定します

名前空間: System.Web.UI.WebControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public Overrides Property
 BorderColor As Color
Dim instance As DropDownList
Dim value As Color

value = instance.BorderColor

instance.BorderColor = value
public override Color BorderColor { get; set;
 }
/** @property */
public Color get_BorderColor ()

/** @property */
public void set_BorderColor (Color value)

プロパティ
コントロール境界線の色を表す System.Drawing.Color。

解説解説
メモメモ

BorderColor プロパティは、WebControl クラスから継承されDropDownList コントロールには適用されません。

使用例使用例

カスタム DropDownList コントロールBorderColor プロパティ取得または設定する方法次のコード例示します

<%@ Page Language="VB" AutoEventWireup="True"
 %>
<%@ Register TagPrefix="aspSample" Namespace="Samples.AspNet.VB.Controls"
 Assembly="Samples.AspNet.VB"
 %>
<HTML>
    <HEAD>
        <title>Custom DropDownList - BorderColor - VB.NET Example</title>
        <script runat="server">
            Sub Page_Load(sender As Object,
 e As EventArgs)
                DropDownList1.Items.Add(New ListItem("Item1",
 "Item1"))
                DropDownList1.Items.Add(New ListItem("Item2",
 "Item2"))
                DropDownList1.Items.Add(New ListItem("Item2",
 "Item2"))
            End Sub
        </script>
    </HEAD>
    <body>
        <form id="Form1" method="post"
 runat="server">
            <h3>Custom DropDownList - BorderColor - VB.NET Example</h3>
            <aspSample:CustomDropDownListBorderColor id="DropDownList1"
 runat="server" />
        </form>
    </body>
</HTML>
<br /><span space="preserve">...</span><br
 />Imports System.Web
Imports System.Security.Permissions

Namespace Samples.AspNet.VB.Controls
    <AspNetHostingPermission(SecurityAction.Demand, Level:=AspNetHostingPermissionLevel.Minimal)>
 _
    Public NotInheritable Class
 CustomDropDownListBorderColor
        Inherits System.Web.UI.WebControls.DropDownList

        Public Overrides Property
 BorderColor() As System.Drawing.Color
            ' NOTE: The BorderColor property is inherited from the WebControl
 
            ' class and is not applicable to the DropDownList control.
 
            Get
                Return MyBase.BorderColor
            End Get
            Set(ByVal Value As
 System.Drawing.Color)
                MyBase.BorderColor = Value
            End Set
        End Property

        Public Overrides Property
 BorderStyle() As System.Web.UI.WebControls.BorderStyle
            ' NOTE: The BorderStyle property is inherited from the WebControl
 
            ' class and is not applicable to the DropDownList control.
 
            Get
                Return MyBase.BorderStyle
            End Get
            Set(ByVal Value As
 System.Web.UI.WebControls.BorderStyle)
                MyBase.BorderStyle = Value
            End Set
        End Property

        Public Overrides Property
 BorderWidth() As System.Web.UI.WebControls.Unit
            ' NOTE: The BorderWidth property is inherited from the WebControl
 
            ' class and is not applicable to the DropDownList control.
 
            Get
                Return MyBase.BorderWidth
            End Get
            Set(ByVal Value As
 System.Web.UI.WebControls.Unit)
                MyBase.BorderWidth = Value
            End Set
        End Property

        Public Overrides Property
 ToolTip() As String
            ' NOTE: The ToolTip property is inherited from the WebControl
 
            ' class and is not applicable to the DropDownList control.
 
            Get
                Return MyBase.ToolTip
            End Get
            Set(ByVal Value As
 String)
                MyBase.ToolTip = Value
            End Set
        End Property
    End Class
End Namespace
<%@ Page Language="C#" AutoEventWireup="True" %>
<%@ Register TagPrefix="aspSample" Namespace="Samples.AspNet.CS.Controls"
 Assembly="Samples.AspNet.CS" %>
<HTML>
  <HEAD>
    <title>Custom DropDownList - BorderColor - C# Example</title>
    <script runat="server">
      private void Page_Load(object sender,
 System.EventArgs e)
      {
          DropDownList1.Items.Add(new ListItem("Item1",
 "Item1"));
          DropDownList1.Items.Add(new ListItem("Item2",
 "Item2"));
          DropDownList1.Items.Add(new ListItem("Item2",
 "Item2"));
      }
    </script>
  </HEAD>
  <body>
      <form id="Form1" method="post" runat="server">
          <h3>Custom DropDownList - BorderColor - C# Example</h3>

          <aspSample:CustomDropDownListBorderColor
          id="DropDownList1"
          runat="server" />

      </form>
  </body>
</HTML>
<br /><span space="preserve">...</span><br />using
 System.Web;
using System.Security.Permissions;

namespace Samples.AspNet.CS.Controls
{
    [AspNetHostingPermission(SecurityAction.Demand, Level = AspNetHostingPermissionLevel.Minimal)]
    public sealed class CustomDropDownListBorderColor
 : System.Web.UI.WebControls.DropDownList
    {
    [System.ComponentModel.Browsable(false)]
    public override System.Drawing.Color BorderColor
    {
      // NOTE: The BorderColor property is inherited from the WebControl
 
      // class and is not applicable to the DropDownList control. 
      get
      {
        return base.BorderColor;
      }
      set
      {
        base.BorderColor = value;
      }
    }

    public override System.Web.UI.WebControls.BorderStyle BorderStyle
    {
      // NOTE: The BorderStyle property is inherited from the WebControl
 
      // class and is not applicable to the DropDownList control. 
      get
      {
        return base.BorderStyle;
      }
      set
      {
        base.BorderStyle = value;
      }
    }

    public override System.Web.UI.WebControls.Unit BorderWidth
    {
      // NOTE: The BorderWidth property is inherited from the WebControl
 
      // class and is not applicable to the DropDownList control. 
      get
      {
        return base.BorderWidth;
      }
      set
      {
        base.BorderWidth = value;
      }
    }

    public override string ToolTip
    {
      // NOTE: The ToolTip property is inherited from the WebControl
 
      // class and is not applicable to the DropDownList control. 
      get
      {
        return base.ToolTip;
      }
      set
      {
        base.ToolTip = value;
      }
    }
  }
}
<%@ Page Language="VJ#" AutoEventWireup="True" %>
<%@ Register TagPrefix="aspSample" Namespace="Samples.AspNet.JSL.Controls"
 Assembly="Samples.AspNet.JSL" %>
<HTML>
  <HEAD>
    <title>Custom DropDownList - BorderColor - VJ# Example</title>
    <script runat="server">
        
    private void Page_Load(Object sender, System.EventArgs
 e)
    {
        DropDownList1.get_Items().Add(new ListItem("Item1",
 "Item1"));
        DropDownList1.get_Items().Add(new ListItem("Item2",
 "Item2"));
        DropDownList1.get_Items().Add(new ListItem("Item2",
 "Item2"));
    } //Page_Load
    </script>
  </HEAD>
  <body>
      <form id="Form1" method="post" runat="server">
          <h3>Custom DropDownList - BorderColor - VJ# Example</h3>

          <aspSample:CustomDropDownListBorderColor
          id="DropDownList1"
          runat="server" />

      </form>
  </body>
</HTML>
<br /><span space="preserve">...</span><br />package
 Samples.AspNet.JSL.Controls;

public class CustomDropDownListBorderColor
    extends System.Web.UI.WebControls.DropDownList
{
    /** @attribute System.ComponentModel.Browsable(false)
     */
    // NOTE: The BorderColor property is inherited from the WebControl
 
    // class and is not applicable to the DropDownList control.
    /** @property 
     */     
    public System.Drawing.Color get_BorderColor()        
    {
        return super.get_BorderColor();
    } //get_BorderColor

    /** @property 
     */
    public void set_BorderColor(System.Drawing.Color
 value)
    {
        super.set_BorderColor(value);
    } //set_BorderColor

    // NOTE: The BorderStyle property is inherited from the WebControl
 
    // class and is not applicable to the DropDownList control.
    /** @property 
     */    
    public System.Web.UI.WebControls.BorderStyle get_BorderStyle()
       
    {
        return super.get_BorderStyle();
    } //get_BorderStyle

    /** @property 
     */
    public void set_BorderStyle(System.Web.UI.WebControls.BorderStyle
 value)
    {
        super.set_BorderStyle(value);
    } //set_BorderStyle

    // NOTE: The BorderWidth property is inherited from the WebControl
 
    // class and is not applicable to the DropDownList control.
    /** @property 
     */    
    public System.Web.UI.WebControls.Unit get_BorderWidth()  
       
    {
        return super.get_BorderWidth();
    } //get_BorderWidth

    /** @property 
     */
    public void set_BorderWidth(System.Web.UI.WebControls.Unit
 value)
    {
        super.set_BorderWidth(value);
    } //set_BorderWidth

    // NOTE: The ToolTip property is inherited from the WebControl 
    // class and is not applicable to the DropDownList control.
    /** @property 
     */    
    public String get_ToolTip()         
    {
        return super.get_ToolTip();
    } //get_ToolTip

    /** @property 
     */
    public void set_ToolTip(String value)
    {
        super.set_ToolTip(value);
    } //set_ToolTip
} //CustomDropDownListBorderColor
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


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

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

辞書ショートカット

すべての辞書の索引

「DropDownList.BorderColor プロパティ」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS