Beispiel #1
0
 /// <summary>
 /// 绘制Label
 /// </summary>
 /// <param name="g">画布</param>
 /// <param name="l">lbl</param>
        public void DrawLabel(Graphics g,LabelTransparent l)
        {
            if(m_IsTransparent)
            {
                this.Visible = false;
            g.DrawString(l.Text, l.Font, new SolidBrush(l.ForeColor), l.Left, l.Top);
            }
        }
Beispiel #2
0
        public LabelTransparent InitLabel(LabelTransparent lab, string str)
        {
            lab.Font = font_labelFont;
            lab.BackColor = color_BackColor;
            lab.Anchor = ((AnchorStyles.Left) | (AnchorStyles.Top));
            lab.Text = str;
            lab.AutoSize = true;
            lab.IsTransparent = true;
            lab.ForeColor = color_ForeColor;

            return lab;
        }