Z
zacks
I have a multiline textbox control where I would like to load up with
something like the following:
This is Line 1 <- this line is NOT bold
This is Line 2 <- this line is bold
This is Line 3 <- this line is NOT bold
I have attempted to use C# code like the following:
string part1 = "This is Line 1" + Environment.NewLine;
string part2 = "This is Line 2" + Environment.NewLine;
string part3 = "This is Line 3" + Environment.NewLine;
textbox.Text = part1;
textbox.Font = new Font(textbox.Font, textbox.Font.Style |
FontStyle.Bold);
textbox.AppendText(part2);
textbox.Font = new Font(textbox.Font, textbox.Font.Style | !
FontStyle.Bold);
textbox.AppendText(part3);
But the compiler complains that the ! operator cannot appear where it
is. I know there has to be some simple way to do this, but I just
haven't been able to find it yet.
Can anyone help?
TIA,
something like the following:
This is Line 1 <- this line is NOT bold
This is Line 2 <- this line is bold
This is Line 3 <- this line is NOT bold
I have attempted to use C# code like the following:
string part1 = "This is Line 1" + Environment.NewLine;
string part2 = "This is Line 2" + Environment.NewLine;
string part3 = "This is Line 3" + Environment.NewLine;
textbox.Text = part1;
textbox.Font = new Font(textbox.Font, textbox.Font.Style |
FontStyle.Bold);
textbox.AppendText(part2);
textbox.Font = new Font(textbox.Font, textbox.Font.Style | !
FontStyle.Bold);
textbox.AppendText(part3);
But the compiler complains that the ! operator cannot appear where it
is. I know there has to be some simple way to do this, but I just
haven't been able to find it yet.
Can anyone help?
TIA,