I found the solution to both of these problems, although I found another one. First my solutions...

To solve the scroll problem I had to add the -style option to the creation of my RichEdit widget and I also had to include the following line in my display sub:

$display->SendMessage(0x115, 1, 0);

I assume this tells the scrollbar to scroll down 1.

To fix the color reset problem I changed the $display->ReplaceSel("$input[$_]\r\n"); to $display->ReplaceSel("\r\n$input[$_]"); and I also had to add the following line after the for loop:

$display->SetCharFormat( -bold => 0, -color => "#000000");

Which just resets the CharFormat.

The problem I uncovered however has to do with IRC as my script connects to an IRC chatroom. How do I display the colors that were sent from the IRC connection? I have no idea how to detect which colors were sent (and this is probably a question for another list)


Sky Blueshoes

I have a RichEdit widget in which I use as a display to my program. I created a sub in which I call whenever I want to display something:

sub display {
   my @input = @_;
   for (0..$#input) {
       $display->Select(1e9, 1e9);
       $display->ReplaceSel("$input[$_]\r\n");
   }
}

Ok, now I have two problems...

First, I'll use $display->SetCharFormat( -bold => 1, -color => "#0000FF"); to change the color of the line I want to display, but it immediately changes back after just one line. Do I have to set this before every line I want Blue? If you look at my sub I would like to use it like this: &display('First line of text', 'second line...', 'etc');
In this example only the first line would be blue

The second problem I am having is with the scrolling...I have a status bar widget underneath this RichEdit widget, instead of the text scrolling up like I would like it to, it just pushes the status bar down and never even shows a scroll bar. How do I fix this?


Thanks in advance,


Sky Blueshoes


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
http://perl-win32-gui.sourceforge.net/




Reply via email to