Page 1 of 1

TextQuality on textbox

Posted: Thu Jan 20, 2011 4:06 am
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?

TextQuality on textbox

Posted: Thu Jan 20, 2011 4:51 am
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.

TextQuality on textbox

Posted: Thu Jan 20, 2011 5:18 am
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!

TextQuality on textbox

Posted: Thu Jan 20, 2011 5:41 am
by Andrew
Ok!

Thank you.