zoukankan      html  css  js  c++  java
  • 使用Graphics.DrawString如何实现textBox换行打印

    ---恢复内容开始---

    使用下面代码可以实现文本换行操作

    using (Font font = new Font("方正黑体简体", 10F, FontStyle.Regular))
                using (SolidBrush brush = new SolidBrush(Color.Black))
                using (Pen pen = new Pen(Color.Black))
                {
                    StringFormat sf = new StringFormat();

                    sf.Alignment = StringAlignment.Center;

                    sf.LineAlignment = StringAlignment.Center;

                    pageEventArgs.Graphics.DrawString("文档内容" , font, brush, new Rectangle(29, 17, 46, 15), sf);

    ---恢复内容结束---

  • 相关阅读:
    数据库默认隔离级别
    openldap安装
    new word
    ldap概念
    Oracle 计算函数
    informix 学习资料收集
    convert to groovy project
    ldap资料
    hibernate session
    IE BUG相关文章集合
  • 原文地址:https://www.cnblogs.com/zhaoguoying/p/9399947.html
Copyright © 2011-2022 走看看