Back to Devexpress

Lesson 3 - Draw Formatted Text

windowsforms-92-controls-and-libraries-printing-exporting-getting-started-lesson-3-draw-formatted-text.md

latest1.3 KB
Original Source

Lesson 3 - Draw Formatted Text

  • Aug 15, 2025
  • 2 minutes to read

This lesson shows you how to create a link that generates a document containing formatted text surrounded by borders.

View Example: Get Started with Printing Library

To add formatted text to a document via a printing link, do the following.

  1. To create a new printing link, declare a new class (called Lesson3 ) derived from the Lesson2 class defined in the previous lesson. The extended functionality provided by the new class includes the color of the background, border, and font, as well as brick border specified in the Detail section.

  2. Next, modify the main form’s Load event handler to pass the Printing System of the Document Viewer to the new link.

Launch the application and view the result.

See Also

Lesson 4 - Draw Formatted/Colored Text