-3
如何在丰富的文本框中显示这张照片的真实面目?有人会提供一些代码或例子吗?如何在RichtextBox中显示权力?
如何在丰富的文本框中显示这张照片的真实面目?有人会提供一些代码或例子吗?如何在RichtextBox中显示权力?
刚才看了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;
** NB **设置SelectionFont时,您用于SelectionCharOffset的值将取决于字体大小。例如。如果你的字体大小是48点,SelectionCharOffset为10是不够的;你会想要更像44的东西。试试数字,直到你看到你想要的样子。 –
您应该对RTF格式进行一些研究。 –
https://en.wikipedia.org/wiki/Vulgar_Display_of_Power –