Does Xojo have any plans for StyledTextPrinter functionality on Windows?
Several of my apps use StyledTextPrinter which means that I cannot move beyond version 2020r2.1. Converting the apps to output PDF is not an option in a few cases so I now have no way to print styled text.
Feedback report 63415 states that the issue has been “Fixed” by updating the documentation to indicate StyledTextPrinter is not available on Windows but that doesn’t solve the problem of not having the functionality or a suitable replacement.
I’ve filed a Feature Request in Feedback urging the functionality be restored in Windows.
Hi Dale. I’m completely surprised a feature was removed from Xojo without an alternative. I just spent the last month changing my primary product to the new API and now to be hit with this. It’s a bit sole destroying…
Chris: t is not the first one (to be remove from Xojo, silently or not) and this is common in our industry.
“I have to release, I remove this incomplete (or broken) feature, I will add it back later”…
Sometimes later become… never. Sometimes it comes n the following release.
When the FTC is finally put out as open source, all of it or components of it can be used to create a styled text solution. Xojo could also import it and make it available as generalized text view in the IDE. The solution is there in the FTC.
Sorry, @Brendan_Murphy. I was worried I’d leave someone out because I only know the most recent history. I’ll update the notes. Thank you for the wonderful control!
I’ll probably attach some kind of license to it but it would be free of charge.
It’s code I wrote a while back to split text areas up so that I could draw them to a graphics context.
I did a quick test today implementing the StyledTextPrinter’s DrawBlock / EOF commands and it seems to work when drawing to a non printer graphics context so I assume it will work for a printer graphics context.
My replacement extends a text area subclass which means that you need to have a non visible instance of it on a window.
It would also require you to tweak your code as you need to call one method to calculate the data and then calls to draw the block(s).
I imagine I would have to create some kind of demo project but that shouldn’t be too hard.
I haven’t looked into your code too closely but there does seem to be a problem with calculating the StyleRuns. I added the following code to your demo app’s Open event handler:
Hi Kevin. Thank you very much for posting this solution. I tried to get it to work but could only get so far (I expect an issue on my side). I found another work-around for the specific issue that was holding me up, so I went with that. Thanks again for your generosity with this. - Chris