Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

RichTextBoxLink Class

A link to print the RichTextBox control.

Namespace: DevExpress.XtraPrintingLinks

Assembly: DevExpress.XtraPrinting.v24.2.dll

NuGet Package: DevExpress.Win.Printing

#Declaration

#Remarks

Use the RichTextBoxLink class to print the RichTextBox control.

To do this, assign an existing RichTextBox object to the RichTextBoxLinkBase.RichTextBox property, and then call either the RichTextBoxLink.ShowPreview (RichTextBoxLink.ShowPreviewDialog) method to preview a document, or the RichTextBoxLink.Print (RichTextBoxLink.PrintDlg) method to send it to a printer.

#Example

This example illustrates how to create and display a Print Preview for the RichTextBox control, via the RichTextBoxLink.

PrintingLinks-RichTextBox

using System;
using System.Windows.Forms;
using DevExpress.XtraPrintingLinks;
// ...

private void simpleButton1_Click(object sender, EventArgs e) {
    RichTextBoxLink rtbLink = new RichTextBoxLink();
    rtbLink.RichTextBox = richTextBox1;
    rtbLink.RtfReportHeader = "Rich Text Box Link";
    printingSystem1.Links.Add(rtbLink);
    rtbLink.ShowPreviewDialog();
}
See Also