-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 –