In Microsoft Word, when making a bulleted list, pressing tab or backspace changes the position of the current bullet point, like this:
However, In the RTB, pressing tab produces the following result:
Is there any clean way to achieve this? Or do I need to look at creating a custom RTB? (If so please provide code snippet)
Thanks!
You can do it by using events, for example;
Code;
private void Form1_Load(object sender, EventArgs e)
{
richTextBox1.SelectionBullet = true;
richTextBox1.AcceptsTab = true;
}
private void richTextBox1_KeyUp(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Tab)
{
richTextBox1.SelectionIndent = 30;
}
if (e.KeyCode == Keys.Enter)
{
richTextBox1.SelectionIndent = 0;
}
}
Result;

Hope helps,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With