GroupBox 控件中的圓角 (Rounded corners in GroupBox control)


問題描述

GroupBox 控件中的圓角 (Rounded corners in GroupBox control)

如何在表單中的 GroupBox 中獲得圓角?屬性選項卡中是否有任何選項?


參考解法

方法 1:

When visual styles are enabled for your application and the FlatStyle property is set to "System", the group boxes look like they have slightly rounded corners, but it's probably no more than 3 to 5 degrees. So I suppose this is not what you're looking for.

Unfortunately, there's no built‑in way to customize its degree of roundedness. The only real solution is to use a custom control. You can either inherit off of the existing GroupBox control and override its Paint event to draw the borders yourself, or you can use one of these existing controls:

方法 2:

Take a look at this open source controls: http://roundedgroupbox.codeplex.com/

(by SrivastavaCody Grayuser523650)

參考文件

  1. Rounded corners in GroupBox control (CC BY‑SA 3.0/4.0)

#controls #winforms #groupbox #.net






相關問題

如何在不阻塞的情況下用大量信息填充列表視圖? (How to populate listview with a lot of information without blocking?)

查看項目是否在列錶框控件中的最有效方法 (Most efficient way to see if an item is or is not in a listbox control)

tcng - 匹配“if”語句中的端口範圍 (tcng - match port range in "if" statement)

將圖像加載到面板 (Load image to panel)

Cycle2 Plugin Ẩn / Hiện các nút jQuery (Cycle2 Plugin Hide/Show buttons jQuery)

如何使用 Windows 資源管理器顯示項目和詳細信息展開/折疊 (How to Display Items and Details with Windows Explorer Expand/Collapse)

ASP.NET 2.0 JQuery AJAX 登錄 (ASP.NET 2.0 JQuery AJAX Login)

單步執行控件看不到第二個下拉菜單 (Step through controls fail to see second dropdown)

用戶控件、服務器控件和自定義控件之間有什麼區別? (What are the differences between User Controls, Server Controls & Custom Controls?)

GroupBox 控件中的圓角 (Rounded corners in GroupBox control)

在 .NET 中編寫大型多步驟表單的最有效方法是什麼? (Most efficient way to code a large multi-step form in .NET?)

如何從 ASP .NET MVC 中的動態生成控件中獲取數據? (How can I get data from dynamic generated controls in ASP .NET MVC?)







留言討論