回复 1楼yiitht的帖子
可以使用 RichTextBoxCellType 实现,参考代码:
- Dim rtb As New System.Windows.Forms.RichTextBox
- rtb.Text = "e=mc2"
- rtb.SelectionStart = 4
- rtb.SelectionLength = 1
- rtb.SelectionCharOffset = Font.Height / 2
- rtb.SelectedText = "2"
- FpSpread1.ActiveSheet.ColumnHeader.Cells(0, 0).Renderer = New FarPoint.Win.Spread.CellType.RichTextCellType()
- FpSpread1.ActiveSheet.ColumnHeader.Cells(0, 0).Value = rtb.Rtf
- rtb.Dispose()
复制代码 |