Ticket T282071
Visible to All Users

How to make some part of the text bold in xrRichText

created 10 years ago

Hello,

i intend to make some part of the text bold in a xrRichText control. In one of the previous threads(T181999) i have seen Yaroslav mentioning that the xrLabel has a property called AllowHtmlString. And using this property for the label control, we can format the text like "My Name is <b> Surya </b> ".

can something like this be achieved using xrRichText control ?

Thanks

Answers approved by DevExpress Support

created 10 years ago (modified 10 years ago)

Hi Surya,

The aforementioned ticket describes how to accomplish this task using the WinForms LabelControl, but not XRLabel. XRLabels are intended to display plain text only.

The XRRichText control was designed specifically for displaying formatted text in your reports. Please review the following help topic that describes how to customize formatting when working in Visual Studio:
Rich Text

If you wish to override formatting at runtime, utilize the approach demonstrated in the following Code example:
How to override RTF formatting in XRRichText

    Comments (3)

      Thanks Ingvar for the prompt repsonse.
      However, using the document server, when i change the formatting its changing the formatting for the entire text. I have already tried this.
      I am trying to override the formatting only for particular text at runtime. can you please give an example for how to make a part of the text bold at runtime.

        Thanks Ingvar. I was able to figure it out.
        Once again thank you for the prompt response.

        DevExpress Support Team 10 years ago

          You are always welcome, Surya!

          Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

          Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.