zoukankan      html  css  js  c++  java
  • 2005自定义控件显示基准线

     
    [Designer( typeof( CustomControlDesigner))]
    public class CustomControl1: Control
    {
     public CustomControl()
     {
     }
     protected override void OnPaint(PaintEventArgs pe)
     {
      pe.Graphics.FillRectangle(new SolidBrush(this.BackColor),pe.ClipRectangle);
      base.onPaint(pe);
     }
     
     public class CustomControlDesigner : ControlDesigner
     {
      public override System.Collections.IList SnapLines
      {
       get
       {
        List<SnapLine> snaplines = new List<SnapLine>();
         snaplines.Add(new SnapLine(SnapLineType.Baseline,3));
        return snaplines;
       }
       }
      }
     }
    }
    非有希望才坚持,坚持才会有希望
  • 相关阅读:
    3月6日
    2月28日
    2月23日
    2月20日
    2月19日
    2月18日
    2月17日
    2月16日
    2月15日
    面试算法题——硬币找零
  • 原文地址:https://www.cnblogs.com/eugenewu0808/p/DefineLine.html
Copyright © 2011-2022 走看看