1金币
RichTextBox rtbsup = new RichTextBox();
rtbsup.Font = new Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
rtbsup.SelectedText = "测试文本" + "右上角";
rtbsup.SelectionStart = "测试文本".Length;
rtbsup.SelectionLength = "右上角".Length;
rtbsup.SelectionCharOffset = 5;
FarPoint.Win.Spread.CellType.RichTextCellType rtct = new FarPoint.Win.Spread.CellType.RichTextCellType();
this.fpSpread1_Sheet1.Cells[0, 0].CellType = rtct;
this.fpSpread1_Sheet1.Cells[0, 0].Value = rtbsup.Rtf;
this.fpSpread1_Sheet1.Cells[0, 1].Value = "正常文本信息";
fpSpread1.PrintSheet(-1); // 打印
通过该方法设置文本显示在右上角,科室打印出来后,字体自动变粗体?
|
|