if I'm reading this correctly you are wanting to replace everything in the
Richedit box with your new $text? the easiest way I found was to just use
$MainWindow->Results()->Text($text); if I am incorrect in my assumption
please let me know....


so the new sub would be 

sub UpdateResults {
    my ($text,$format) = @_;
    $MainWindow->Results()->SetCharFormat(@{$ResultsTextFormat{$format}});
    $MainWindow->Results()->Text($text);
    return;
}




-----Original Message-----
From: Jonathan Southwick [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 30, 2002 11:20 AM
To: perl-win32-gui-users@lists.sourceforge.net
Subject: [perl-win32-gui-users] RichEdit update


I have a routine that updates my richedit control but while it is getting 
updated the control does not refresh properly.  Here is my code:

sub UpdateResults {
    my ($text,$format) = @_;
    $MainWindow->Results->SetCharFormat(@{$ResultsTextFormat{$format}});
    $MainWindow->Results->Select(999999,999999);  # this puts the cursor at 
the end of the text
    $MainWindow->Results->ReplaceSel($text, 1);  # this replaces what's 
there with what I want
    $MainWindow->Results->Update();
    $MainWindow->Update();
    return;
}


Shouldn't this work?

Jonathan


_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm

_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users

Reply via email to