如何实现一个有下画线的,无边框的TextBox??

解决方案 »

  1.   

    <input type="text" style="border:none;border-bottom:1px solid #000;" />
      

  2.   

    ~_~不好意思,Winform就需要自己重绘1个输入控件了,自带的实现不了
      

  3.   

    楼主看看效果吧,最多设置一下textBox的颜色textBox3.BorderStyle = BorderStyle.None; //去掉边框//在textBox下方画线
    private void Form1_Paint(object sender, PaintEventArgs e)
    {
        e.Graphics.DrawLine(Pens.Black,
            new Point(textBox3.Bounds.Left, textBox3.Bounds.Bottom + 1),
            new Point(textBox3.Bounds.Right - 1, textBox3.Bounds.Bottom + 1));
    }