Tag Archives: format equations

Display subscripts and superscripts in a RichTextBox in C#, version 2

The following examples show how to display subscripts and superscripts in a RichTextBox. Display subscripts and superscripts in a RichTextBox in C# Easily display subscripts and superscripts in a RichTextBox in C# Those were fairly simple examples, and Sudhir Srivastava … Continue reading

Posted in fonts, formatting | Tagged , , , , , , , , , , , , , | Leave a comment

Use WPF code to display subscripts and superscripts in C#

In the post Display subscripts and superscripts in a WPF TextBlock in C# I mentioned that you could make subscripts and superscripts in WPF code but it was easier in XAML code. Juan Manuel Montes asked for an example, so … Continue reading

Posted in fonts, formatting, wpf, XAML | Tagged , , , , , , , , , , , , , , , , , | Leave a comment

Display subscripts and superscripts in a WPF TextBlock in C#

The following examples show how to display subscripts and superscripts in a RichTextBox in a Windows Forms program. Easily display subscripts and superscripts in a RichTextBox in C# Display subscripts and superscripts in a RichTextBox in C# In a WPF … Continue reading

Posted in fonts, formatting, wpf, XAML | Tagged , , , , , , , , , , , , , , , , , | 1 Comment

Easily display subscripts and superscripts in a RichTextBox in C#

The example Display subscripts and superscripts in a RichTextBox in C# requires you to make arrays holding the positions of the characters that should be subscripts and superscripts. That’s not a big deal but it does require you to count … Continue reading

Posted in fonts, formatting | Tagged , , , , , , , , , , , , , , , | 3 Comments

Display subscripts and superscripts in a RichTextBox in C#

A TextBox can only use a single font at a time so it can’t display subscripts and superscripts, but a RichTextBox can do it. Simply use the control’s Select method to select the text that should be a subscript or … Continue reading

Posted in fonts, formatting | Tagged , , , , , , , , , , , , , | 2 Comments