winform==>GroupBox 自定义控件

【Qt】容器类控件GroupBox 使用QGroupBox实现一个带有标题的分组框,可以把其他的控件放在里面里面作为一组 阅读详情
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;

namespace WindowsApplication1
{
    public partial class GroupBox : UserControl
    {
        public GroupBox()
        {
            InitializeComponent();
            InitializeStyles();
            InitializeGroupBox();
        }
        /// <summary>This method will initialize the controls custom styles.</summary>
        private void InitializeStyles()
        {
            //Set the control styles----------------------------------
            this.SetStyle(ControlStyles.DoubleBuffer, true);
            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.UserPaint, true);
            this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
            //--------------------------------------------------------
        }


        /// <summary>This method will initialize the GroupBox control.</summary>
        private void InitializeGroupBox()
        {
            components = new System.ComponentModel.Container();
            this.Resize += new EventHandler(GroupBox_Resize);
            this.DockPadding.All = 20;
            this.Name = "GroupBox";
            this.Size = new System.Drawing.Size(368, 288);
        }
         protected override void OnPaint(PaintEventArgs e)
        {
            //PaintBack(e.Graphics);
            Test(e.Graphics);
    
        }
        public void Test(Graphics g)
        {
            g.SmoothingMode = SmoothingMode.AntiAlias;
            int ArcX2 = (this.ShadowControl) ? (this.Width - (15)) - this.ShadowThickness : this.Width - (15);

            int ArcY2 = (this.ShadowControl) ? (this.Height - (15)) - this.ShadowThickness : this.Height - (15);

            System.Drawing.Drawing2D.GraphicsPath path = new System.Drawing.Drawing2D.GraphicsPath();
            System.Drawing.Brush BorderBrush = new SolidBrush(Color.FromArgb(224, 224, 224));
            System.Drawing.Pen BorderPen = new Pen(BorderBrush, 1);
           // System.Drawing.Drawing2D.LinearGradientBrush BackgroundGradientBrush = null;
           // System.Drawing.Brush BackgroundBrush = new SolidBrush(this.BackgroundColor);
           // System.Drawing.SolidBrush ShadowBrush = null;
           // System.Drawing.Drawing2D.GraphicsPath ShadowPath = null;
   
            //Create Rounded Rectangle Path------
            path.AddArc(0, 10, 14, 14, 180, GroupBoxConstants.SweepAngle); // Top Left
            path.AddArc(ArcX2, 10, 14, 14, 270, GroupBoxConstants.SweepAngle); //Top Right
            path.AddArc(ArcX2, ArcY2, 14, 14, 360, GroupBoxConstants.SweepAngle); //Bottom Right
            path.AddArc(0, ArcY2, 14, 14, 90, GroupBoxConstants.SweepAngle); //Bottom Left
            path.CloseAllFigures();
            //-----------------------------------

            ////Check if Gradient Mode is enabled--
            //if (this.BackgroundGradientMode == GroupBoxGradientMode.None)
            //{
            //    //Paint Rounded Rectangle------------
            //    g.FillPath(BackgroundBrush, path);
            //    //-----------------------------------
            //}
            //else
            //{
            //    BackgroundGradientBrush = new LinearGradientBrush(new Rectangle(0, 0, this.Width, this.Height), this.BackgroundColor, this.BackgroundGradientColor, (LinearGradientMode)this.BackgroundGradientMode);

            //    //Paint Rounded Rectangle------------
            //    g.FillPath(BackgroundGradientBrush, path);
            //    //-----------------------------------
            //}
            ////-----------------------------------

            //Paint Borded-----------------------
            g.DrawPath(BorderPen, path);
            //-----------------------------------
 

        }
        private int V_RoundCorners = 10;
        /// <summary>This feature will round the corners of the control.</summary>
        [Category("Appearance"), Description("This feature will round the corners of the control.")]
        public int RoundCorners
        {
            get { return V_RoundCorners; }
            set
            {
                if (value > 25)
                {
                    V_RoundCorners = 25;
                }
                else
                {
                    if (value < 1) { V_RoundCorners = 1; }
                    else { V_RoundCorners = value; }
                }

                this.Refresh();
            }
        }
        /// <summary>This feature will allow you to turn on control shadowing.</summary>
        [Category("Appearance"), Description("This feature will allow you to turn on control shadowing.")]
        public bool ShadowControl { get { return V_ShadowControl; } set { V_ShadowControl = value; this.Refresh(); } }
        private bool V_ShadowControl = false;
        /// <summary>This feature will change the size of the shadow border.</summary>
        [Category("Appearance"), Description("This feature will change the size of the shadow border.")]
        public int ShadowThickness
        {
            get { return V_ShadowThickness; }
            set
            {
                if (value > 10)
                {
                    V_ShadowThickness = 10;
                }
                else
                {
                    if (value < 1) { V_ShadowThickness = 1; }
                    else { V_ShadowThickness = value; }
                }

                this.Refresh();
            }
        }
        private int V_ShadowThickness = 3;
        private System.Drawing.Color V_BorderColor = Color.Black;
        /// <summary>This feature will change the group control color. This color can also be used in combination with BackgroundGradientColor for a gradient paint.</summary>
        [Category("Appearance"), Description("This feature will change the group control color. This color can also be used in combination with BackgroundGradientColor for a gradient paint.")]
        public System.Drawing.Color BackgroundColor { get { return V_BackgroundColor; } set { V_BackgroundColor = value; this.Refresh(); } }
        private System.Drawing.Color V_BackgroundColor = Color.White;

        /// <summary>This class holds all GroupBox constants.</summary>
        public class GroupBoxConstants
        {
            #region Constants

            /// <summary>The sweep angle of the arc.</summary>
            public const int SweepAngle = 90;

            /// <summary>The minimum control height.</summary>
            public const int MinControlHeight = 32;

            /// <summary>The minimum control width.</summary>
            public const int MinControlWidth = 96;

            #endregion
        }
        /// <summary>This feature turns on background gradient painting.</summary>
        [Category("Appearance"), Description("This feature turns on background gradient painting.")]
        public GroupBoxGradientMode BackgroundGradientMode { get { return V_BackgroundGradientMode; } set { V_BackgroundGradientMode = value; this.Refresh(); } }
        private GroupBoxGradientMode V_BackgroundGradientMode = GroupBoxGradientMode.None;
        /// <summary>A special gradient enumeration.</summary>
        public enum GroupBoxGradientMode
        {
            /// <summary>Specifies no gradient mode.</summary>
            None = 4,

            /// <summary>Specifies a gradient from upper right to lower left.</summary>
            BackwardDiagonal = 3,

            /// <summary>Specifies a gradient from upper left to lower right.</summary>
            ForwardDiagonal = 2,

            /// <summary>Specifies a gradient from left to right.</summary>
            Horizontal = 0,

            /// <summary>Specifies a gradient from top to bottom.</summary>
            Vertical = 1
        }
        /// <summary>This feature will allow you to change the color of the control's border.</summary>
        [Category("Appearance"), Description("This feature will allow you to change the color of the control's border.")]
        public System.Drawing.Color BorderColor { get { return V_BorderColor; } set { V_BorderColor = value; this.Refresh(); } }

        /// <summary>This feature will allow you to set the control's border size.</summary>
        [Category("Appearance"), Description("This feature will allow you to set the control's border size.")]
        public float BorderThickness
        {
            get { return V_BorderThickness; }
            set
            {
                if (value > 3)
                {
                    V_BorderThickness = 3;
                }
                else
                {
                    if (value < 1) { V_BorderThickness = 1; }
                    else { V_BorderThickness = value; }
                }
                this.Refresh();
            }
        }
        private float V_BorderThickness = 1;

        /// <summary>This feature will change the control's shadow color.</summary>
        [Category("Appearance"), Description("This feature will change the control's shadow color.")]
        public System.Drawing.Color ShadowColor { get { return V_ShadowColor; } set { V_ShadowColor = value; this.Refresh(); } }
        private System.Drawing.Color V_ShadowColor = Color.DarkGray;
        /// <summary>This feature can be used in combination with BackgroundColor to create a gradient background.</summary>
        [Category("Appearance"), Description("This feature can be used in combination with BackgroundColor to create a gradient background.")]
        public System.Drawing.Color BackgroundGradientColor { get { return V_BackgroundGradientColor; } set { V_BackgroundGradientColor = value; this.Refresh(); } }
        private System.Drawing.Color V_BackgroundGradientColor = Color.White;

        /// <summary>This method will paint the control.</summary>
        /// <param name="g">The paint event graphics object.</param>
        private void PaintBack(System.Drawing.Graphics g)
        {
            //Set Graphics smoothing mode to Anit-Alias--
            g.SmoothingMode = SmoothingMode.AntiAlias;
            //-------------------------------------------

            //Declare Variables------------------
            int ArcWidth = this.RoundCorners * 2;
            int ArcHeight = this.RoundCorners * 2;
            int ArcX1 = 0;
            int ArcX2 = (this.ShadowControl) ? (this.Width - (ArcWidth + 1)) - this.ShadowThickness : this.Width - (ArcWidth + 1);
            int ArcY1 = 10;
            int ArcY2 = (this.ShadowControl) ? (this.Height - (ArcHeight + 1)) - this.ShadowThickness : this.Height - (ArcHeight + 1);
            System.Drawing.Drawing2D.GraphicsPath path = new System.Drawing.Drawing2D.GraphicsPath();
            System.Drawing.Brush BorderBrush = new SolidBrush(this.BorderColor);
            System.Drawing.Pen BorderPen = new Pen(BorderBrush, this.BorderThickness);
            System.Drawing.Drawing2D.LinearGradientBrush BackgroundGradientBrush = null;
            System.Drawing.Brush BackgroundBrush = new SolidBrush(this.BackgroundColor);
            System.Drawing.SolidBrush ShadowBrush = null;
            System.Drawing.Drawing2D.GraphicsPath ShadowPath = null;
            //-----------------------------------

            //Check if shadow is needed----------
            if (this.ShadowControl)
            {
                ShadowBrush = new SolidBrush(this.ShadowColor);
                ShadowPath = new System.Drawing.Drawing2D.GraphicsPath();
                ShadowPath.AddArc(ArcX1 + this.ShadowThickness, ArcY1 + this.ShadowThickness, ArcWidth, ArcHeight, 180, GroupBoxConstants.SweepAngle); // Top Left
                ShadowPath.AddArc(ArcX2 + this.ShadowThickness, ArcY1 + this.ShadowThickness, ArcWidth, ArcHeight, 270, GroupBoxConstants.SweepAngle); //Top Right
                ShadowPath.AddArc(ArcX2 + this.ShadowThickness, ArcY2 + this.ShadowThickness, ArcWidth, ArcHeight, 360, GroupBoxConstants.SweepAngle); //Bottom Right
                ShadowPath.AddArc(ArcX1 + this.ShadowThickness, ArcY2 + this.ShadowThickness, ArcWidth, ArcHeight, 90, GroupBoxConstants.SweepAngle); //Bottom Left
                ShadowPath.CloseAllFigures();

                //Paint Rounded Rectangle------------
                g.FillPath(ShadowBrush, ShadowPath);
                //-----------------------------------
            }
            //-----------------------------------

            //Create Rounded Rectangle Path------
            path.AddArc(ArcX1, ArcY1, ArcWidth, ArcHeight, 180, GroupBoxConstants.SweepAngle); // Top Left
            path.AddArc(ArcX2, ArcY1, ArcWidth, ArcHeight, 270, GroupBoxConstants.SweepAngle); //Top Right
            path.AddArc(ArcX2, ArcY2, ArcWidth, ArcHeight, 360, GroupBoxConstants.SweepAngle); //Bottom Right
            path.AddArc(ArcX1, ArcY2, ArcWidth, ArcHeight, 90, GroupBoxConstants.SweepAngle); //Bottom Left
            path.CloseAllFigures();
            //-----------------------------------

            //Check if Gradient Mode is enabled--
            if (this.BackgroundGradientMode == GroupBoxGradientMode.None)
            {
                //Paint Rounded Rectangle------------
                g.FillPath(BackgroundBrush, path);
                //-----------------------------------
            }
            else
            {
                BackgroundGradientBrush = new LinearGradientBrush(new Rectangle(0, 0, this.Width, this.Height), this.BackgroundColor, this.BackgroundGradientColor, (LinearGradientMode)this.BackgroundGradientMode);

                //Paint Rounded Rectangle------------
                g.FillPath(BackgroundGradientBrush, path);
                //-----------------------------------
            }
            //-----------------------------------

            //Paint Borded-----------------------
            g.DrawPath(BorderPen, path);
            //-----------------------------------

            //Destroy Graphic Objects------------
            if (path != null) { path.Dispose(); }
            if (BorderBrush != null) { BorderBrush.Dispose(); }
            if (BorderPen != null) { BorderPen.Dispose(); }
            if (BackgroundGradientBrush != null) { BackgroundGradientBrush.Dispose(); }
            if (BackgroundBrush != null) { BackgroundBrush.Dispose(); }
            if (ShadowBrush != null) { ShadowBrush.Dispose(); }
            if (ShadowPath != null) { ShadowPath.Dispose(); }
            //-----------------------------------
        }

        private void GroupBox_Resize(object sender, EventArgs e)
        {
            this.Invalidate(false);
        }
 
    }
}

编译后在工具箱生成控件直接拖到窗体上使用就行。

忘了修改哪里的代码了。应该是codeproject上面的、

另外一种:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Drawing2D;

namespace WindowsApplication1
{
    public partial class UserControl2 : UserControl
    {
     
        public UserControl2()
        {
            InitializeComponent();
            InitializeStyles();
           
        }
        /// <summary>This method will initialize the controls custom styles.</summary>
        private void InitializeStyles()
        {
            //Set the control styles----------------------------------
            this.SetStyle(ControlStyles.DoubleBuffer, true);
            this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
            this.SetStyle(ControlStyles.UserPaint, true);
            this.SetStyle(ControlStyles.SupportsTransparentBackColor, true);
            //--------------------------------------------------------
        }
        protected override void OnPaint(PaintEventArgs e)
        {
            //PaintBack(e.Graphics);
            Test(e.Graphics);

        }
        public void Test(Graphics g)
        {
            g.SmoothingMode = SmoothingMode.AntiAlias;
        
            System.Drawing.Drawing2D.GraphicsPath path = new System.Drawing.Drawing2D.GraphicsPath();
            System.Drawing.Brush BorderBrush = new SolidBrush(Color.FromArgb(224, 224, 224));
            System.Drawing.Pen BorderPen = new Pen(BorderBrush, 1);

            //Create Rounded Rectangle Path------
            path.AddArc(0, 10, 14, 14, 180, 90); // Top Left
            path.AddArc(this.Width - (15), 10, 14, 14, 270, 90); //Top Right
            path.AddArc(this.Width - (15), this.Height - (15), 14, 14, 360, 90); //Bottom Right
            path.AddArc(0, this.Height - (15), 14, 14, 90, 90); //Bottom Left
            path.CloseAllFigures();
            //-----------------------------------
            //Paint Borded-----------------------
            g.DrawPath(BorderPen, path);
            //-----------------------------------
            //Destroy Graphic Objects------------
            if (path != null) { path.Dispose(); }
            if (BorderBrush != null) { BorderBrush.Dispose(); }
            if (BorderPen != null) { BorderPen.Dispose(); }
             //-----------------------------------

        }
      
   
        private void UserControl2_Resize(object sender, EventArgs e)
        {
            this.Invalidate(false);
        }

    }
}


WPF (容器控件8)GroupBox控件的详细使用教程 GroupBox 是 WPF 中用于将相关的控件分组并添加一个标题的控件。它通常用于组织表单、选项或设置,使用户界面更加清晰和结构化。 阅读详情

相关推荐

GroupBox分组框详解及Python示例代码

GroupBox是一种常用的容器类部件,用于将相关的部件组织在一起,并提供视觉上的分组效果。GroupBox(分组框)是一种常见的容器类部件,用于将其他相关的部件组织在一起并提供视觉上的分组效果。GroupBox可以通过Frame部件实现,我们可以使用Frame的relief参数来设置分组框的边框样式,常见的样式包括FLAT、RAISED、SUNKEN、GROOVE和RIDGE。例如,在一个应用程序的设置界面中,我们可以使用GroupBox将相关的选项分组,使用户可以更方便地浏览和修改这些选项。

ByteHero的博客 562

GroupBox控件

GroupBox控件常常用于逻辑地组合一组控件,如RadioButton 及 CheckBox控件,显示一个框架,其上有一个标题。 组框的用法非常简单,把它拖放到窗体上,再把所需的控件拖放到组框中即可(但其顺序不能颠倒--不能把组框放在已有的控件上面)。其结果是父控件是组框,而不是窗体,所以在任意时刻,可以选择多个RadioButton。但在组框中,一次只能选择一个RadioButton。

流浪若相惜的专栏 3万+

PyQt学习笔记:GroupBox分组框介绍及使用示例

在上面的代码中,我们创建了一个QVBoxLayout布局,并将其设置为主窗口的布局。在上面的代码中,我们创建了两个QPushButton按钮和一个QLabel标签,并使用QVBoxLayout布局将它们添加到内部布局中。GroupBox(分组框)是PyQt中的一个容器部件,它可以用于将一组相关的控件放置在一个框架内,以便更好地组织和呈现界面。GroupBox是PyQt中一个有用的容器部件,可以将相关的控件组织在一起,并提供一个描述性的标题。上面的代码将分组框的背景颜色设置为浅灰色,并添加了一个灰色的边框。

PixelLogic的博客 948

Qt 容器类控件

Group Box;Tab Widget

ikun66666的博客 1562

UFS 功能描述:UFS boot

UFS 启动过程介绍:启动配置,启动代码下载过程和安全性

m0_51720747的博客 1601

写给小白的“具身智能”入门科普

智能”,大家都懂,也就是AI。那么,什么是“具身”?“具身”是一个很小众的名词,通常都出现在哲学、认知科学领域。它的英文叫Embodied,是embody的过去式和过去分词。em-表示“进入,使……”,-body表示“身体”。组合起来,就是“使……进入身体”。Embodied Intelligence(具身智能),顾名思义,就是“使智能进入身体”、“给智能一个身体”的意思。那么,具身智能,是不是就是“AI+身体”呢?这样说并不准确。

欢迎来到我的博客 1821

WinFrom自定义控件–GroupBox扩展

一、简单回顾 在上一篇中,介绍了如何去扩展WinFrom现有控件来实现一个新的控件。 扩展控件的主要方法就是根据需求,提取所需控件的相关特定的属性和方法,对属性和方法进行扩展,以此来实现新的控件。在扩展控件开发过程中,需要实现OnPaint事件代码或者重写WndProc回调函数方法。   二、扩展GroupBox控件 在本节中,主要在WinFrom窗体控件GroupB

斌哥的博客 3165

C语言--第三大的数

第三大的数 给定一个非空数组,返回此数组中第三大的数。如果不存在,则返回数组中最大的数. 示例1: 输入: [3, 2, 1] 输出: 1 解释: 第三大的数是 1. 示例2: 输入: [1, 2] 输出: 2 解释: 第三大的数不存在, 所以返回最大的数 2 . ...

loreal8的博客 2131

WPF 控件专题 GroupBox控件详解

WPF 控件专题 GroupBox控件详解

^@^lemon tea^@^ 8121

2023华为od机试C卷【宽度最小的子矩阵】Python 实现

给定一个矩阵,包含N*M个整数,和一个包含K个整数的数组现在要求在这个矩阵中找一个宽度最小的子矩阵,要求子矩阵包含数组中所有的整数。

MISAYAONE的博客 2186

基于TENG的呼吸测量与识别系统:从蓝牙到WiFi的改造与上位机实现

本文介绍了一种基于摩擦纳米发电机(TENG)的呼吸测量系统改造方案,将原有蓝牙通信升级为WiFi传输。系统通过TENG传感器采集呼吸信号,STM32微控制器处理数据后,经ESP8266 WiFi模块发送至上位机。文中详细阐述了硬件改造(四通道改单通道、蓝牙换WiFi)、嵌入式软件修改(包括ESP8266驱动、数据采集与TCP通信实现)以及上位机软件设计。改造后的系统提升了传输距离和稳定性,为可穿戴健康监测提供了更优解决方案。

huanghm88的专栏 110

【WPF应用42】WPF中的 GroupBox 控件详解

WPF中的 GroupBox 控件详解

qq_35320456的博客 5742

【Bug已解决】Context window exceeded / Token limit reached — Claude Code 上下文窗口超限解决方案

Claude Code 长会话中报上下文窗口/Token 超限,本质是对话历史、文件内容、工具结果累积超过 200K 上限。文中给出 /clear、/compact、分批读大文件、限制工具输出、配置 autoCompact 等完整方案。

一键难忘的博客 6728

Winform之GroupBox

提供一个带边框的矩形区域可以添加标题文本通常用于将逻辑相关的控件组合在一起本身不处理用户输入,仅作为容器GroupBox 是 WinForms 中一个简单但非常有用的控件,它通过视觉分组帮助用户理解界面结构,同时作为容器简化了控件的管理。通过合理使用 GroupBox,可以创建更清晰、更易用的用户界面。希望本教程能帮助您掌握 GroupBox 控件的使用方法。在实际开发中,可以根据具体需求灵活运用 GroupBox 的各种特性和功能。

Major_S的博客 1653

Android 16强制横竖屏设置

但开发者端的响应却相对滞后,特别是中小型开发团队受限于大屏设备市场渗透率(截至2023年Q2,Android平板全球激活量约1.2亿台,不足手机设备5%)及开发成本考量,适配优先级普遍偏低。这种适配滞后已形成恶性循环——开发者因设备基数不足降低适配意愿,而用户体验缺陷又反向抑制大屏设备的市场接受度。要破解这一困局,既需要Google持续优化Jetpack Compose等现代化UI工具链,更需要建立开发者激励体系,通过应用商店流量倾斜、开发补贴等经济手段提升适配投入产出比。再不肯好好适配大屏设备?

xiangzhihong8的专栏 978

NX二次开发PK获取对象类型

PK_ENTITY_ask_class(),获取对象类型建议用这个函数,比较通用,包含所有对象类型,可以替代UF_MODL_ask_edge_type(),UF_MODL_ask_body_type(),UF_MODL_ask_face_type()等函数。

qq_39541524的博客 827

【WinForm详细教程六】WinForm中的GroupBox和Panel 、TabControl 、SplitContainer控件

TabControl:是一个用于管理TabPages集合的容器控件,可以将多个TabPages分组显示在不同的选项卡中,每个TabPage是一个容器控件,可放置其他控件。:都是容器控件,可以将其他控件放入其中,实现集中管理。拖动容器时,其中的控件会一起移动。控件是一个用于将页面拆分成两个大小可调整的区域的容器控件,中间有一个拆分条,通过拖动拆分条来调整左右或上下区域的大小。:也是一个容器控件,用来集中显示和管理其他控件。:是一个分组容器,提供一个框架将相关的控件组织在一起,它有标题、边框,但没有滚动条。

QHCV的博客 8737

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

C#学习笔记:groupbox的使用功能

GroupBox(框架)控件是C#中用来组织其他控件形成一个控件组,可以把一些控件拉到里面,组成一个整体,整体控制,比如enable,visiable等等,我有时也用它来替代一下边框的功能,美观界面 将其他控件拖拽到GroupBox中就可以形成一个控件组。当框架移动时,该控件组同时移动,不会产生其他的位移,所以是组织界面的好东西。 GroupBox的使用 它主要有两个属性:Text和Visi...

一片雾霾的博客 1万+

Camera2Demo

在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作

OV9734 DATASHEET,完整规格书

OV9734完整规格书,包括电气参数,尺寸规格,寄存器配置表等

C#Winform拓展控件之GroupBox

winform拓展控件GroupBox

Iawfy_的博客 5062

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

第15.31节 PyQt(Python+Qt)入门学习:containers容器类部件GroupBox分组框简介

老猿Python博文目录 专栏:使用PyQt开发图形界面Python应用 老猿Python博客地址 一、概述 容器部件就是可以在部件内放置其他部件的部件,在Qt Designer中可以使用的容器部件有如下: GroupBox分组框是一个对多个部件进行编组的框架容器,用于将多个围绕同一主题的部件在分组框内编组,便于对这些子部件进行排列编组和布局管理。 二、分组框主要属性 GroupBox分组框...

老猿Python 2306

C#中groupBox1控件详细使用方法

C#中groupBox1控件详细使用方法

xiaogongzhu001的博客 5920

WinForm之分组 (GroupBox

WinForm中的GroupBox控件是一种带标题的容器控件,主要用于对相关控件进行视觉分组,提升界面可读性。其核心特性包括:自带标题文本(Text属性)描述分组内容,支持三种边框样式(BorderStyle),可作为容器管理子控件布局。GroupBox特别适用于选项组(如单选按钮)、功能模块分组和条件集合等场景。与Panel相比,GroupBox的优势在于具有标题和边框的视觉区分效果,但不适合Dock=Fill的布局。使用时应保持标题简洁,合理设置Padding和Margin,避免过度嵌套。通过与其他布局

weixin_66547608的博客 1172

QT基础学习(5)---容器(上)

文章目录QT容器一、Group box的使用1.建立项目2.修改项目中的widget.h 文件3.修改项目中widget.cpp文件4.运行结果二、Scroll Area的使用1.建立项目2.修改项目中的widget.h 文件3.修改项目中widget.cpp文件4.运行结果三、Tool box的使用1.建立项目2.修改项目中的widget.h 文件3.修改项目中widget.cpp文件4.运行测试结果 QT容器 一、Group box的使用 1.建立项目 2.修改项目中的widget.h 文件 #..

weixin_46616556的博客 370

java groupbox_学习Winform分组类控件(Panel、groupBox、TabControl)

分组类控件主要包括容器控件(Panel),分组框控件(groupBox)和选项卡控件(TabControl)等控件。一、Panel控件Panel控件是由System.Windows.Forms.Panel类提供的,主要作用就是将其他控件组合一起放在一个面板上,使这些控件更容易管理。当Panel控件面板上要显示过多的控件时,可设置AutoScroll属性为true。Panel控件在默认情况下不显示边...

weixin_32165219的博客 794

QML类型:GroupBox

一、描述 GroupBox 用于将一组逻辑控件布局在一起。GroupBox 不提供自己的布局。 声明为 GroupBox 子项的项自动成为 GroupBox 的 contentItem 的父项。动态创建的项目需要明确地作为 contentItem 的父级。 如果在 GroupBox 中只使用一个项目,它将调整大小以适应其包含项目的隐式大小。 这使得它特别适合与布局一起使用。 import QtQuick 2.14 import QtQuick.Window 2.14 import QtQuick.

友善啊,朋友的博客 3328

【Qt】:常用控件(九:容器类控件)

Group Box(分组框),Tab Widget(标签页)

m0_73790767的博客 738
上一篇: ASP.NET 4 页面控件无法被禁用及产生aspNetDisabled处理方法
下一篇: winform -tab选项切换dropdownlist值不变
蝶恋花雨
博客等级 码龄21年 1290粉丝 147原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值