在TextBox控件底端添加下划线效果

Posted on 2018-12-18 23:39  努力成长静待花开  阅读(928)  评论(0编辑  收藏  举报

实现效果:
  

知识运用:

  TextBox控件的Font属性

实现代码:

        private void btn_Display_UnderLine_Click(object sender, EventArgs e)
        {
            textBox1.Font = new Font("楷体",22,FontStyle.Underline);
        }