Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ユーザーがマークしたテキストを取得して、テキスト ボックスのテキスト全体を太字にするのではなく、マークされたテキストだけを太字にするにはどうすればよいですか? ステートメントの作成方法がわかりません。
String data=TextBox1.SelectedText;
選択したテキストを太字または特定のフォントに設定するなど、テキストをフォーマットするには、RichTextBoxControl を使用する必要があります。
例:
richTextBox1.SelectionFont = new Font("Arial", 10, FontStyle.Bold);