TextQuality on textbox

Stimulsoft Reports.WPF discussion
Post Reply
JorisWils
Posts: 86
Joined: Tue Jun 30, 2009 7:49 am
Location: belgium

TextQuality on textbox

Post by JorisWils »

Hi

I see that the property "textQuality" on a textbox is missing in the WPF version.

Now.... We design our reports with the WPF designer, but users generate the reports with the .NET version.
Sometimes text in textboxes would not display correctly, but we could solve that by changing the "textquality" property on a textbox to "wysiwyg".
Yet we can't do that anymore now because that property is not available in the WPF designer.

But

Is there a way to set that property for all textboxes in a report by setting something in the beginrender-event of the report?
Something like:

foreach (textbox in report)
{
textbox.textquality="wysiwyg";
}

What would be the correct syntax for this?
Using Stimulsoft since 2007
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

TextQuality on textbox

Post by Alex K. »

Hello,

For WPF, this property is not relevant, since it uses its own engine to display text similar to the WYSIWYG mode.
You can use the following code:

Code: Select all

for (int pageInd = 0; pageInd < report.Pages.Count; pageInd++)
{
    foreach (StiComponent component in report.Pages[pageInd].Components)
    {
        if (component is StiText)
        {
            ((StiText)component).TextQuality = StiTextQuality.Wysiwyg;
        }
    }
}
Thank you.
JorisWils
Posts: 86
Joined: Tue Jun 30, 2009 7:49 am
Location: belgium

TextQuality on textbox

Post by JorisWils »

Thx a lot Aleksey

Yet I changed "report" to "this" so I don't have to worrie about the report name anymore :-)

Code: Select all

for (int pageInd = 0; pageInd > this.Pages.Count; pageInd++)
{
    foreach (StiComponent component in this.Pages[pageInd].Components)
    {
        if (component is StiText)
        {
            ((StiText)component).TextQuality = StiTextQuality.Wysiwyg;
        }
    }
}
Thx!
Using Stimulsoft since 2007
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

TextQuality on textbox

Post by Andrew »

Ok!

Thank you.
Post Reply