Hi,
I have a Windows form having a UltraFormattedTextEditor, and a button.
When I click that button it will insert some text("User") in the UltraformattedTextEditor . When I insert that text i want to change the background of the text to "Yellow" and make it Bold, and after that if i type something it will appear as normal text, with default background.
i want to achive it through C# code. If it is possible, please provide me some sample.
Thanks,
private void ultraButton1_Click(object sender, EventArgs e) { ultraFormattedTextEditor1.Appearance.BackColor = Color.Yellow; ultraFormattedTextEditor1.Appearance.FontData.Bold = Infragistics.Win.DefaultableBoolean.True; ultraFormattedTextEditor1.Text = "User"; }
private void ultraFormattedTextEditor1_ValueChanged(object sender, EventArgs e) { if (ultraFormattedTextEditor1.Text != "User") { ultraFormattedTextEditor1.Appearance.BackColor = Color.Empty; ultraFormattedTextEditor1.Appearance.FontData.Bold = Infragistics.Win.DefaultableBoolean.Default; } }
hope this helps