Hey,

Im working on some tray thing here but I really hate that the docs for this API is so nonexisting! 'TBD' everywhere!

Anyway, I had a coupld of questions about this:
1. Exactly how can I append to this richedit without having to do something like this:
$richEdit->Text($richEdit->Text() . " Appended text\n");
How about inserting? I can also use an array, append to that and use that for the Text function, but still feels rather crappy because the whole text is rewritten to the widget...

2. Can I save the changed style on the text somehow. Like say I do:
$richEdit->Select (0, 20); $richEdit->SetCharFormat(-color => "#0000FF");
Now, if I do the code mentioned in #1, everything gets the same attribute throughout the text (all text is blue).
This is rather a combined problem with #1. The thing is, I wanna be able of adding text with a special font/color/size etc, and keep it that way, even if I add more text (with different font/color etc). That is, I wanna add text to this richedit with different styles and keep them that way. Or I have to add all text, and change afterwards? (this seems so dumb).
Like this would be ideal:
my $font = new Win32::GUI::Font( -name => "Courier New", #-height => 16, -bold => 1, ); $richEdit->Append(-text => " Appended text", -font => $font);

I would also like to have some nice tutorial/API for this kind of stuff. All I could find (which is good, but not complete is http://jeb.ca/perl/win32-gui-docs ). With a more complete API, things would be hell of alot easier!

In reply to Questions about Win32::GUI::RichEdit by Ace128

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.