BorderStyle 列挙体
アセンブリ: System.Web (system.web.dll 内)

Public Enumeration BorderStyle

メンバ名 | 説明 | |
---|---|---|
Dashed | 破線の境界線。 | |
Dotted | 点線の境界線。 | |
Double | ニ重線の境界線。 | |
Groove | 境界線をくぼみ表示にするための下降側の境界線。 | |
Inset | コントロールをくぼんで表示するためのくぼみ表示の境界線。 | |
None | 境界線なし。 | |
NotSet | 境界線スタイルが設定されていません。 | |
Outset | コントロールを浮き出して表示するためのアウトセット境界線。 | |
Ridge | 境界線を浮き出して表示するための上昇側の境界線。 | |
Solid | 実線の境界線。 |

BorderStyle 列挙体は、コントロールのさまざまな境界線スタイル オプションを表します。
境界線の幅は、WebControl クラスの BorderWidth プロパティを使用して制御します。
![]() |
---|
Double スタイルを使用する場合は、2 本の線とその間にスペースが入れられるように、境界線の幅に少なくとも 3 ピクセルを指定する必要があります。 |

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


System.Web.UI.WebControls 名前空間
WebControl
WebControl.BorderWidth
DropDownList
DropDownList.BorderWidth
ListBox
ListBox.BorderWidth
Style
Style.BorderWidth
BorderStyle 列挙体
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

<ComVisibleAttribute(True)> _ Public Enumeration BorderStyle



BorderStyle 列挙体と TreeView.BorderStyle、TreeView.HideSelection、および TreeView.ShowRootLines の各プロパティを使用するコード例を次に示します。この例を実行するには、次のコードをフォームに貼り付けて、フォームのコンストラクタまたは Load メソッドで InitializeTreeView メソッドを呼び出します。
' Declare the TreeView control. Friend WithEvents TreeView1 As System.Windows.Forms.TreeView ' Initialize the TreeView to blend with the form, giving it the ' same color as the form and no border. Private Sub InitializeTreeView() ' Create a new TreeView control and set the location and size. Me.TreeView1 = New System.Windows.Forms.TreeView Me.TreeView1.Location = New System.Drawing.Point(72, 48) Me.TreeView1.Size = New System.Drawing.Size(200, 200) ' Set the BorderStyle property to none, the BackColor property to ' the form's backcolor, and the Scrollable property to false. ' This allows the TreeView to blend in form. Me.TreeView1.BorderStyle = BorderStyle.None Me.TreeView1.BackColor = Me.BackColor Me.TreeView1.Scrollable = False ' Set the ShowRootLines and ShowLines properties to false to ' give the TreeView a list-like appearance. Me.TreeView1.ShowRootLines = False Me.TreeView1.ShowLines = False ' Add the nodes. Me.TreeView1.Nodes.AddRange(New System.Windows.Forms.TreeNode() _ {New System.Windows.Forms.TreeNode("Features", _ New System.Windows.Forms.TreeNode() _ {New System.Windows.Forms.TreeNode("Full Color"), _ New System.Windows.Forms.TreeNode("Project Wizards"), _ New System.Windows.Forms.TreeNode("Visual C# and Visual Basic Support")}), _ New System.Windows.Forms.TreeNode("System Requirements", _ New System.Windows.Forms.TreeNode() _ {New System.Windows.Forms.TreeNode _ ("Pentium 133 MHz or faster processor "), _ New System.Windows.Forms.TreeNode("Windows 98 or later"), _ New System.Windows.Forms.TreeNode("100 MB Disk space")})}) ' Set the tab index and add the TreeView to the form. Me.TreeView1.TabIndex = 0 Me.Controls.Add(Me.TreeView1) End Sub
// Declare the TreeView control. internal System.Windows.Forms.TreeView TreeView1; // Initialize the TreeView to blend with the form, giving it the // same color as the form and no border. private void InitializeTreeView() { // Create a new TreeView control and set the location and size. this.TreeView1 = new System.Windows.Forms.TreeView(); this.TreeView1.Location = new System.Drawing.Point(72, 48); this.TreeView1.Size = new System.Drawing.Size(200, 200); // Set the BorderStyle property to none, the BackColor property to // the form's backcolor, and the Scrollable property to false. // This allows the TreeView to blend in form. this.TreeView1.BorderStyle = BorderStyle.None; this.TreeView1.BackColor = this.BackColor; this.TreeView1.Scrollable = false; // Set the HideSelection property to false to keep the // selection highlighted when the user leaves the control. // This helps it blend with form. this.TreeView1.HideSelection = false; // Set the ShowRootLines and ShowLines properties to false to // give the TreeView a list-like appearance. this.TreeView1.ShowRootLines = false; this.TreeView1.ShowLines = false; // Add the nodes. this.TreeView1.Nodes.AddRange(new TreeNode[] {new TreeNode("Features", new TreeNode[]{ new TreeNode("Full Color"), new TreeNode("Project Wizards"), new TreeNode("Visual C# and Visual Basic Support")}), new TreeNode("System Requirements", new TreeNode[]{ new TreeNode("Pentium 133 MHz or faster processor "), new TreeNode("Windows 98 or later"), new TreeNode("100 MB Disk space")}) }); // Set the tab index and add the TreeView to the form. this.TreeView1.TabIndex = 0; this.Controls.Add(this.TreeView1); }
// Declare the TreeView control. System.Windows.Forms.TreeView treeView1; // Initialize the TreeView to blend with the form, giving it the // same color as the form and no border. private void InitializeTreeView() { // Create a new TreeView control and set the location and size. this.treeView1 = new System.Windows.Forms.TreeView(); this.treeView1.set_Location(new System.Drawing.Point(72, 48)); this.treeView1.set_Size(new System.Drawing.Size(200, 200)); // Set the BorderStyle property to none, the BackColor property to // the form's backcolor, and the Scrollable property to false. // This allows the TreeView to blend in form. this.treeView1.set_BorderStyle(BorderStyle.None); this.treeView1.set_BackColor(this.get_BackColor()); this.treeView1.set_Scrollable(false); // Set the HideSelection property to false to keep the // selection highlighted when the user leaves the control. // This helps it blend with form. this.treeView1.set_HideSelection(false); // Set the ShowRootLines and ShowLines properties to false to // give the TreeView a list-like appearance. this.treeView1.set_ShowRootLines(false); this.treeView1.set_ShowLines(false); // Add the nodes. this.treeView1.get_Nodes().AddRange( new TreeNode[] {new TreeNode("Features" , new TreeNode[] { new TreeNode("Full Color"), new TreeNode("Project Wizards"), new TreeNode("Visual C# and Visual Basic Support") }), new TreeNode("System Requirements", new TreeNode[] { new TreeNode("Pentium 133 MHz or faster processor "), new TreeNode("Windows 98 or later"), new TreeNode("100 MB Disk space") }) }); // Set the tab index and add the TreeView to the form. this.treeView1.set_TabIndex(0); this.get_Controls().Add(this.treeView1); } //InitializeTreeView

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


- border-styleのページへのリンク