Reputation: 29497
I'm building a simple application, but I need to know how to use a RichTextBox and position the text on it, like: center, right and left. But how I can do this?
Upvotes: 0
Views: 4359
Reputation: 1
Try the property of selectionChanged and set the Horizantal alignment to either center, right, or left.
private void richTxtBox_SelectionChanged(object sender, EventArgs e) {
richTxtBox.SelectionAlignment = HorizontalAlignment.Center;
}
Upvotes: 0
Reputation: 24450
Use the SelectionAlignment
property. See MSDN for details.
Upvotes: 3