the_slycer has asked for the wisdom of the Perl Monks concerning the following question:

I have written an app, basically it searches txt files, finds hits, and displays them on screen. This has all been done so far in Tk, is very fast, and the people that I wrote it for like it.

The problem is that it's just txt, unable to do bold characters or different color characters etc. I have been asked to modify it to allow linkage, italics, bolding etc. I have searching and searching trying to find a solution for this. Ideally I want to be able to display, within a Tk window (or if I have to rewrite to Win32::Gui I will), RTF or HTML documents.

I don't want to write my own parser to display different colors (ala "richedit" example with Win32::GUI) for 2 reasons. First, I'd have to write it (laziness ;-)) and secondly - more important - I'd have to teach the people who are creating the document how to write the text files properly.

This is probably a prime canditate for web-based vs client based, but most people currently like the fact that it's in a seperate application.

Any ideas/help/pointers to a module would be greatly appreciated.

Replies are listed 'Best First'.
Re: Pretty text in Win2k?
by jeroenes (Priest) on Apr 27, 2001 at 09:21 UTC
    Well, first of all: CPAN is your friend. Simply searching on RTF, for example, gave me parsers, writers, etc. etc.

    If you really want to keep it all in the same application, you could try to embed an internet-explorer in your app. There are ways to do that in C/VB like environs.. maybe you have to write an interface to that.

    However, I just would write an HTML generator (with CGI!) and start a browser to show the results.

    Jeroen
    "We are not alone"(FZ)

      I know all about CPAN :-).
      But there is nothing there for displaying RTF docs :-). Looks like I'll be usin CGI, forget about the "local" app.

      Thanks.