如何在这张照片的富文本框中显示权力的真实面貌?有人会提供一些代码或示例吗?
答案 0 :(得分:1)
请阅读example in MSDN。
richTextBox1.SelectionFont = new Font("Lucinda Console", 12);
// Set the baseline text.
richTextBox1.SelectedText = "x";
// Set the CharOffset to display superscript text.
richTextBox1.SelectionCharOffset = 10;
richTextBox1.SelectionFont = new Font("Lucinda Console", 8);
// Set the superscripted text.
richTextBox1.SelectedText = "2x";
// Reset the CharOffset to display text at the baseline.
richTextBox1.SelectionCharOffset = 0;