zoukankan      html  css  js  c++  java
  • ToolStripSplitButton Checked 效果

    ToolStripSplitButton 系统默认没有Checked效果,MS又说他们没时间改。

    只能自己处理一下了。

    重载OnPaint(PaintEventArgs e)

    if(Checked)

                        Rectangle rect = ButtonBounds;
                        using (Brush br = new LinearGradientBrush(rect,
                                                                  ProfessionalColors.ButtonCheckedGradientBegin,
                                                                  ProfessionalColors.ButtonCheckedGradientEnd,
                                                                  LinearGradientMode.Vertical))
                        {
                            e.Graphics.FillRectangle(br, rect);
                        }

                        rect.Inflate(-1, -1);
                        e.Graphics.DrawRectangle(new System.Drawing.Pen(ProfessionalColors.ButtonSelectedHighlightBorder), rect);
                        base.OnPaint(e);

  • 相关阅读:
    iis添加证书
    重谈主键和索引
    关于心跳包的方案探究
    flutter android keystore
    flutter photo_view的改造
    dart 命名规范
    dart 公共变量
    flutter 交互提示方式
    flutter container image FittedBox AspectRatio
    聊聊flutter的UI布局
  • 原文地址:https://www.cnblogs.com/marryZhan/p/2213960.html
Copyright © 2011-2022 走看看