0

I have used textbrick to display my Text. I want to show certain part of the text bold. Is that possible?

For example:

TextBrick tb = new TextBrick();
tb.Rect = new RectangleF(0, 0, e.Graph.ClientPageSize.Width, 100);
tb.Text="Profile Name : "+lblProfile.Text;

I want to make 'Profile Name' bold.

Raz Mahato
  • 875
  • 1
  • 7
  • 11

2 Answers2

2

You simply set Font property

tb.Font = new Font(tb.Font, FontStyle.Bold);
Marko Juvančič
  • 5,792
  • 1
  • 25
  • 41
0

I suggest to use the RichTextBrick instead of the TextBrick. Note that you need to provide RTF formated text. One of the approaches discussed here

Community
  • 1
  • 1